Python 2中的语法错误
我有作业要做,我做了。我95%确信这是一个正确的代码。我不知道为什么,但不幸的是,我在其中一行中出现了语法错误。这是我的密码:Python 2中的语法错误,python,Python,我有作业要做,我做了。我95%确信这是一个正确的代码。我不知道为什么,但不幸的是,我在其中一行中出现了语法错误。这是我的密码: month = 1 totalPaid = 0 while month <= 12: print('Month: ' + str(month)) print('Minimum monthly payment: ' + str(round(monthlyPaymentRate * balance), 2) balance = round((b
month = 1
totalPaid = 0
while month <= 12:
print('Month: ' + str(month))
print('Minimum monthly payment: ' + str(round(monthlyPaymentRate * balance), 2)
balance = round((balance - (monthlyPaymentRate * balance)) * (1 + (annualInterestRate/12)),2)
print('Remaining balance: ' + str(round(balance, 2)))
month = month + 1
totalPaid = totalPaid + round((monthlyPaymentRate * balance), 2)
print('Total paid: ' + str(totalPaid))
print('Remaining balance: ' + str(balance))
month=1
支付总额=0
而月份
有三个打开的参数,但有两个关闭的参数
有三个开放区,但有两个关闭区。家庭作业标签正在逐步淘汰;请不要再将其添加到帖子中。-1以确保Python解释器对Python语法的了解比您少95%。找一个能匹配帕伦斯的编辑。谢谢你,先生!先生,我可以再要一份吗?家庭作业
标签正在逐步取消;请不要再将其添加到帖子中。-1以确保Python解释器对Python语法的了解比您少95%。找一个能匹配帕伦斯的编辑。谢谢你,先生!先生,我可以再来一杯吗?阿莱鲁哈。非常感谢你,阿莱鲁哈。非常感谢你。
print('Minimum monthly payment: ' + str(round(monthlyPaymentRate * balance), 2)