LU05.L03: Käsebank

bills = [200, 100, 75, 25, 1]
input_string = input("Gewünschter Betrag > ")
amount = int(input_string)
index = 0
while amount > 0:
    if bills[index] > amount:
        index += 1
    else:
        print (str(bills[index]) + ' KD')
        amount = amount - bills[index]
  • modul/archiv/m319python/learningunits/lu05/loesungen/kaese.txt
  • Last modified: 2023/11/13 08:56
  • by 127.0.0.1