我对 python 和整体编程非常陌生,我的家庭作业是在 python 2.7 pyscripter 上编写一个程序。一旦我编写了程序,我就运行它,它要求我输入用户信息。之后什么也没发生,它说调试正在进行中。我等了,但什么也没发生。继承人的代码:
in_balance = float(raw_input("Enter the outstanding balance on your credit card"))
int_rate = float(raw_input('Annual interest rate as decimal'))
min_month_pay = 0
month_int_rate = int_rate/12
month = 0
balance = in_balance
while balance > 0:
month = 0
balance = in_balance
min_month_pay = min_month_pay + 10
while month < 12 and balance > 0:
month = month + 1
interest = month_int_rate * balance
balance = balance + interest
balance = round(balance, 2)
print 'result'
print 'month pay to pay off in 1 year: $', min_month_pay
print 'number of months needed: ', month
print 'Balance: $', balance