首页 > 关于利息计算,信用卡最低还款额的python编程问题。

信用卡最优还款额利息,关于利息计算,信用卡最低还款额的python编程问题。

互联网 2020-09-25 11:22:22

Linux基金会开源软件大学开源技术公开课即将上线,Kubernetes1.19实战讲解!>>>

求助python编程,我最近在跟edx的6.00x课程,虽然有网易的往期视频翻译教程可用,不过好多还是学起来很吃力,现在第一个Pset已经到了最后期限,可是还是弄不出来。一个关于信用卡最低还款额,利息及余额的计算问题。是否有英语编程的python高手,或者也正在学习6.00x课程的同学,给些指导呀,我实在是搞不定了,提问都还搞不太明白,程序都编不出来呀。这个英语授课,虽然有以往中文译文参考,可是学起来也太挑战了。

以下是问题:

第一个问题:

Problem 1: Paying the Minimum : 10.0 pointsWrite a program to calculate the credit card balance after one year if a person only pays the minimum monthly payment required by the credit card company each month.The following variables contain values as described below:    balance - the outstanding balance on the credit card    annualInterestRate - annual interest rate as a decimal    monthlyPaymentRate - minimum monthly payment rate as a decimalFor each month, calculate statements on the monthly payment and remaining balance, and print to screen something of the format: Month: 1 Minimum monthly payment: 96.0 Remaining balance: 4784.0Be sure to print out no more than two decimal digits of accuracy - so print Remaining balance: 813.41instead of Remaining balance: 813.4141998135Finally, print out the total amount paid that year and the remaining balance at the end of the year in the format: Total paid: 96.0 Remaining balance: 4784.0A summary of the required math is found below:    Monthly interest rate= (Annual interest rate) / 12     Minimum monthly payment = (Minimum monthly payment rate) x (Previous balance)     Updated balance each month = (Previous balance - Minimum monthly payment) x (1 + Monthly interest rate) Note that the grading script looks for the order in which each value is printed out and the colon separating the description and the number.The code you paste into the following box should not specify the values for the variables balance, annualInterestRate, or monthlyPaymentRate - our test code will define those values before testing your submission. 我的第一问代码: month=1 totalpaid=0 for month

免责声明:非本网注明原创的信息,皆为程序自动获取自互联网,目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责;如此页面有侵犯到您的权益,请给站长发送邮件,并提供相关证明(版权证明、身份证正反面、侵权链接),站长将在收到邮件24小时内删除。