Page 1 of 1

2. Given the code snippet below: amount = float(input("Please enter the amount e.g. 456.32 for R456.32: R")) r200 Famoun

Posted: Sat May 14, 2022 3:44 pm
by answerhappygod
2 Given The Code Snippet Below Amount Float Input Please Enter The Amount E G 456 32 For R456 32 R R200 Famoun 1
2 Given The Code Snippet Below Amount Float Input Please Enter The Amount E G 456 32 For R456 32 R R200 Famoun 1 (40.14 KiB) Viewed 58 times
2. Given the code snippet below: amount = float(input("Please enter the amount e.g. 456.32 for R456.32: R")) r200 Famount // 200 remaining = amount % 200 amount = remaining 100 = amount // 100 remaining = amount % 100 amount = remaining 150 = amount // 50 remaining = amount % 50 print("Here's the breakdown:") print("R200: " + str(r200)) print("R100:" + str(r100)) print("R50: " + str(r50)) print("Here's what's remaining: R" + str(remaining)) It should become very clear to you (hopefully) that the program cannot compute the number of R20, R10, R5, R2 and/or R1 notes/coins that are required to make the entire payment. You are thus required to modify the program to do this. Your answer should include the above code i.e. it should be the full program and not just your portion. [10 marks].