[Tutor] Help with simple coding

Marshall Jones marshlj20 at gmail.com
Fri Aug 14 11:33:15 EDT 2020


Hiya,

Spent hours on this, but seem to be getting further from getting it right.

money = int(input("how much money would you like to change into coins?"))
coins = input("what coins do you want them in")
pounds = (money // 1)
fifty = (money // 0.5)
twenties = (money // 0.2)
tens = (money // 0.1)
fives = (money // 0.02)
twos = (money // 0.05)
ones = (money // 0.001)
if coins == pounds:
    print (pounds)

and then the same for fifty, twenties etc

Many thanks

Marshall


More information about the Tutor mailing list