python猜数字程序
Here you will get python program to add two numbers.
在这里,您将获得python程序以添加两个数字。
The program will first ask user to enter two numbers, calculate their sum and finally print it.
该程序将首先要求用户输入两个数字,计算其总和,然后打印出来。
input() is an inbuilt function which is used to take input from user.
input()是一个内置函数,用于从用户那里获取输入。
Python程序加两个数字 (Python Program to Add Two Numbers)
a = int(input("enter first number: "))
b = int(input("enter second number: "))
sum = a + b
print("sum:", sum)
Output
输出量
enter first number:5 enter second number:7 sum: 12
输入第一个数字:5 输入第二个数字:7 总和:12
影片教学 (Video Tutorial)
翻译自: https://www.thecrazyprogrammer.com/2017/04/python-program-add-two-numbers.html
python猜数字程序