balance = 5000
monthlyPaymentRate = 0.02
annualInterestRate = 0.18
num = 0
remaining_balance = 0.00
while num <= 12:
remaining_balance = (annualInterestRate/12 * (balance-(balance * monthlyPaymentRate))+ tem_balance
num += 1
print(remaining_balance)
为什么python打印&#34; num + = 1&#34;语法无效?
答案 0 :(得分:1)
在它上方缺少右括号。
func1 3 23 func2 5 main (118) 8
func1 4 20 func2 6 main (128) 9
func1 4 24 func2 6 main (135) 9
func1 4 14 func2 6 main (138) 9
func1 4 16 func2 6 main (141) 9
fun21 8 take 1; func2 18 main (153) 21
fun22 11 take 2; func2 21 main (161) 24
func3 4 func4 6 main (168) 9
func33 6 26 main (175)