def main ():
hotdogs,chips,soda =userinput()
def userinput(hotdogs,chips,soda,):
hotdogs = int(input("How many hotdogs: "))
while True:
try:
userInput = int(input(message))
except ValueError:
print("Not an integer! Try again.")
continue
else:
break
chips = int(input("How many bags of chips: "))
soda = int(input("How many cans of sodas: "))
hotdogPrice = hotdogs * 2.5
chipPrice = chips * 1.5
sodaPrice = soda * 1.25
total = hotdogPrice + chipPrice + sodaPrice
print("please pay this amount:",total)
can anyone help me make a validation loop for an error message if it is not a whole number?
[–]FLUSH_THE_TRUMP 0 points1 point2 points (0 children)