屏幕截图是
我试图修复它,但仍然无法使用。我有以下代码:
def deposit():
while True:
amount = input("What would you like to deposit? $")
if amount.isdigit():
amount = int(amount)
if amount > 0:
break
else:
print("Amount must be greater than 0.")
else:
print("Please enter a number.")
return amount
deposit()
结果是:
[运行] Python -u“ C:\ Users Dmin \ Desktop \ Python Project \ Main.py”
[完成]在0.095秒内以代码= 0退出
我忘了保存它,并试图运行它。我习惯了Google Colab的自动保存,我忘了保存文件然后运行。