我在 python 中构建了一个非常简单的加法计算器:
#This program will add two numbers entered in by the user
print "Welcome!"
num1 = input("Please enter in the first number to be added.")
num2 = input("Please enter in the second number to be added.")
sum = num1 + num2
print "The sum of the two numbers entered is: ", sum
我还没有设置 python,所以我正在使用 codepad.org(一个在线编译器)。
我收到以下错误:
Welcome!
Please enter in the first number to be added.
Traceback (most recent call last):
Line 5, in <module>
num1 = input("Please enter in the first number to be addeded.")
EOFError