Hello! The problem is with the following code:
def snoepAutomaat ():
aantal = 0
totaalBedrag = 0
muntNum = int (input ("Hoeveel munten wil je in de automaat werpen: "))
while aantal in range (muntNum):
munt = float (input ("Waarde Munt: € "))
totaalBedrag = totaalBedrag + munt
aantal = aantal + 1
print ("U heeft €{0} ingeworpen.".format (round(totaalBedrag, 2)))
print ("")
print ("Kies uw item: ")
print ("")
print ("1. Frikandelbroodje")
print ("2. ham en kaas crossaint")
print ("")
eindBedrag = totaalBedrag
round (eindBedrag, 2)
product = int (input ("Voer het nummer van het gewilde product in: "))
while product <1 or product >5:
print ("Dit product kan niet gekozen worden.")
product = int (input("Voer het nummer van het gewilde product in: "))
if product == 1:
eindBedrag = totaalBedrag - 0.59
print ("U kocht een frikandelbroodje, dat koste €0.59")
print ("U heeft {0} in de automaat.".format (round(eindBedrag,2)))
elif product == 2:
eindBedrag = totaalBedrag - 0.49
print ("U kocht een ham kaas crossaint, dat koste €0.49")
print ("U heeft {0} in de automaat.".format (round(eindBedrag,2)))
else:
print ("Dat lukt niet.")
print("")
print ("uw overige geld, €{0}, is uit de automaat gegaan.".format(round(eindBedrag)))
the problem is that python wont ask the user the question.
there are no errors in the code.