[Tutor] Help with simple coding
Richard Damon
Richard at Damon-Family.org
Fri Aug 14 14:52:42 EDT 2020
On 8/14/20 11:33 AM, Marshall Jones wrote:
> 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
What sort of value do you expect to be in coins
What sort of thing are you comparing it to?
--
Richard Damon
More information about the Tutor
mailing list