提问者:小点点

嗨,我刚开始用Python编码。 我写了下面的代码,它给了我一个错误消息。 我为这个初步的调查[结束]道歉


print("The number of eggs you have:")

egg = input()

print ("The number of breads you have:")

breads = input ()

total = int(egg) + int(breads)

print ("Your total is:" + str(int(total))

共1个答案

匿名用户

print("The number of eggs you have:")
egg = input()
print ("The number of breads you have:")
breads = input ()
total = int(egg) + int(breads)
print ("Your total is:" + str(int(total)))

你只是在最后一行少了一个')