[Tutor] How to write a teller machine simulation, was Re: Python 3.5 Question
Peter Otten
__peter__ at web.de
Fri Oct 9 11:36:36 CEST 2015
Sasuke Uchiha wrote:
> Hi, I would like to know how to create a code similar to the result below.
> I want to input a number like 1000, and for it to give me the maximum
> output with the least amount of bills (such as 100s)
>
> -
>
> The bill amounts you have are 100s, 50s, 20s, 10s, 5s, and 1s
> -
>
> >>>
> Please enter the amount of money you wish to withdraw: 1737 You
> received: 17 hundreds.
> 0 fifties.
> 1 twenties.
> 1 tens.
> 1 fives.
> 2 ones.
We don't do your homework, but as this is a common task for students there
is a site that does enough handholding to get you started:
http://cs.smith.edu/dftwiki/index.php/CSC111_Lab_2_2014
If you run into problems and have a little code to show you made an effort
yourself we will help you solve them.
More information about the Tutor
mailing list