Apr-28-2017, 10:48 PM
Hey guys so I am just stuck on the formatting side of my problem: I have written the code correctly I just need to know a few key points please such as printing a list line by line for each item and also having a dollar sign next to the outputted results
My code asks the user to input a cash amount and then prints the change similar to what an atm would do
My code asks the user to input a cash amount and then prints the change similar to what an atm would do
amount=int(input("Please enter amount")) Notes = [100, 50, 20, 10, 5, 2, 1] Returned = [] for i in Notes: while amount >=i: Returned.append(i) amount = amount - i print ("Change Given ",Returned,sep='\n'"")example output
Please enter amount47 Change Given [20, 20, 5, 2]And my output actually needs to print this line by line not all as one line and how would I put a dollar sign in front of each item? Much appreciated in advance cheers :)