📜  用于添加用户输入的 pythn 程序 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:26.432000             🧑  作者: Mango

代码示例1
# Store input numbers
num1 = input('Enter first number: ')
num2 = input('Enter second number: ')

# Add two numbers
sum = float(num1) + float(num2)

# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))