Answered step by step
Verified Expert Solution
Question
1 Approved Answer
use python 1 amount = 67 2 3 #You may modify the lines of code above, but don't move them! 4 #when you Submit your
use python
1 amount = 67 2 3 #You may modify the lines of code above, but don't move them! 4 #when you Submit your code, we'll change these lines to 5 #assign different values to the variables. 6# 7 #write a program that will print out the coins needed to 8 #arrive at the amount shown above. Assume that we always want 9 #the maximum number of large coins: for example, for 67 cents, 10 #we want 2 quarters, 1 dime, 1 nickel, and 2 pennies instead 11 #of 6 dimes and 7 pennies. 12 # 13 #If you are unfamiliar with American currency: a quarter is 14 #worth 25 cents; a dime is worth 10 cents; a nickel is worth 15 #5 cents; a penny is worth 1 cent. 16 # 17 #To make things easier, we've gone ahead and supplied your 18 #print statements. All you need to do is create four variables: 19 #quarters, dimes, nickels, and pennies. 20 # 21 #HINT: Change the value of amount as you go to reflect what 22 #coins you've already found. 23 24 25 #Add your code here! 26 27 28 29 #If your code above is correct, the following lines will 30 #initially print (for amount = 67): 31 #Quarters: 2 32 #Dimes: 1 33 #Nickels: 1 34 #Pennies: 2 35 print("Quarters:", quarters) 36 print("Dimes:", dimes) 37 print("Nickels:", nickels) 38 print("Pennies:", pennies) 39 m+ 40 41 Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started