【发布时间】:2022-06-10 18:32:17
【问题描述】:
我在下面有这段代码,当我尝试在控制台中运行它时,它会立即打开和关闭。即使在最后输入()也是如此...任何帮助将不胜感激...
totalNumDays = 5
totalNumBugs = 0
for currentDay in range(1, totalNumDays + 1):
numBugCollected = int( input("Bugs collected on day " + currentDay ": "))
totalNumBugs = totalNumBugs + numBugCollected
pass
print("You have collected a total of", totalNumBugs)
input("press enter")
【问题讨论】:
-
它还会显示你有语法错误
标签: python