A) Write a program that asks the user for the amount of money they will take on holiday and convert this into the equivalent amount in Euros, ignoring any Cents that might result from the conversion.

B) Improve the above program so that it will tell you how many 50,20,10 and 5 Euro notes you would receive for a given value of Pounds.

Respuesta :

def func():

   money = int(input("How much money will you have on holiday? "))

   print("You will have {} euros.".format(int(money * 1.11)))

   money = int(money * 1.11)

   fifty = 0

   twenty = 0

   ten = 0

   five = 0

   while True:

       if money - 50 >= 0:

           fifty += 1

           money -= 50

       elif money - 20 >= 0:

           twenty += 1

           money -= 20

       elif money - 10 >= 0:

           ten += 1

           money -= 10

       elif money - 5 >= 0:

           five += 1

           money -= 5

       if money < 5:

           print("You will have {} fifties, {} twenties, {} tens, {} fives, and {} ones".format(fifty, twenty, ten, five, money))

           return

func()

I hope this helps!