68 382
Assignments Done
Successfully Done
In November 2018

Answer to Question #59907 in Python for Fahad Awan

Question #59907
You can use this website to solve the problem: http://cscircles.cemc.uwaterloo.ca/2x-extra-practice/#pybox6
Coding Exercise: Payment Calculator

A credit card company computes a customer's "minimum payment" according to the following rule. The minimum payment is equal to either $10 or 2.1% of the customer's balance, whichever is greater; but if this exceeds the balance, then the minimum payment is the balance. Write a program to print out the minimum payment using min and max. Assume that the variable balance contains the customer's balance. Your program does not need to print the dollar sign.
Example 1: if your balance is 1000, then your program should print 21.
Example 2: if your balance is 600, then your program should print 12.6.
Example 3: if your balance is 25, then your program should print 10.
Example 4: if your balance is 8, then your program should print 8.
Expert's answer
# balance = 600
if max([10,balance*0.021]) > balance:

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


Assignment Expert
17.05.16, 19:36

You just not need to remove rounding, see updated answer.

Fahad Awan
15.05.16, 20:07

Dear Experts,
Thank for a Answer but still I'm getting an Error. Use the website to solve the Bug: http://cscircles.cemc.uwaterloo.ca/2x-extra-practice/

2X: Extra Practice: Coding Exercise: Payment Calculator

Leave a comment

Ask Your question

Privacy policy Terms and Conditions