I have multiple inputs here but I want to restrict the input to only integers and display an error message when user inputs a character other than input. And keep asking the user to input the right value before going to the next item.Here is my code:
print ("welkom bij de munten teller")
cent= int(input("vul het aantal 1 centjes in: "))
stuiver= int(input("vul het aantal stuivers in: "))
dubbeltje= int(input("vul het aantal dubbeltjes in: "))
kwartje= int(input("vul het aantal kwartjes in: "))
SRD= int(input("vul het aantal 1 SRD's in: "))
dalla= int(input("vul het aantal 2,50's in: "))
totaal = int ()
fin_cent= cent * 0.01
fin_stuiver = stuiver* 0.05
fin_dubbeltje = dubbeltje * 0.10
fin_kwartje = kwartje * 0.25
fin_SRD = SRD*1
fin_dalla = dalla * 2.50
totaal = fin_cent + fin_stuiver + fin_dubbeltje + fin_kwartje + fin_SRD + fin_dalla
print ("Het totaal is: ", totaal)
#print (totaal)
input("Druk op enter om het programma te beindigen;)")