Question: Instructions You will be given an integer value less than 20. Based on the number given, you will calculate the combination of ten and five

Instructions

You will be given an integer value less than 20. Based on the number given, you will calculate the combination of ten and five dollar bills, toonies (2 dollar coins) and loonies (1 dollar coins) needed to pay such that you pay using as many of the largest bills/coins first.

Details

Input

Input consists of

  • an positive integer (named value) that is less than 20 (read in via input)

Processing

You will need declare and initialize the following integer variables:

  • tens: number of ten dollar bills required.
  • fives: number of five dollar bills needed (after tens are paid towards value)
  • toonies: number of two dollar coins needed (after tens and fives are paid)
  • loonies: number of one dollar coins needed (after tens, fives and toonies are paid)

Output

While output is taken care of for you, it requires the integer variables described above for it to work properly.

 

Sample input/output:

Input Output

19

1 $10 bills

1 $5 bills

2 toonies

0 loonies

Instructions You will be given an integer value less than 20. Based

I Exit Full Screen pod2.py New * BULLITUN. :: 6 value = int(input) 10 # PLEASE START YOUR WORK HERE # 11 EEE===== 12 14 #Calculate the number of tens needed 15 tens = 16 17 #Calculate the number of fiver's needed 18 fives = 1, 19 20 #Calculate the number of toonies needed 21 toonies = 2 22 23 24 #Calculate the number of loonies needed Loonies = 0 25 26 27 # PLEASE END YOUR WORK HERE 28 #======= # 29 30 print( tens, "$10 bills") 31 print( fives, "$5 bills") 32 print( toonies, "toonies") 33 print loonies, "loonies") 34

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!