Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions