求python高手解决.Write a python program that letsthe user enter t
1个回答

输入贷款总量和贷款年数,显示每个月的还款数额和总还款数额

不是很理解"for each monthly interst rate starting from 4 to 8 in increments of 1",请解释

先粘出来写了开头的代码:

import os

class LOAN_ERROR(Exception):

def __init__(self, message):

self._message = message

def __str__(self):

return self._message

if __name__ == "__main__":

try:

total_loan_money = raw_input("loan amount: ")

loan_period = raw_input("loan period (year): ")

if not isinstance(loan_period, int) or loan_period < 0:

raise LOAN_ERROR("Please provide a positive number.")