I'm having a problem in the betting part of a blackjack game i am making, i would like the player to be able to bet $0 if they want to, however when you input 0 it simply repeats the input. Please help as this is the last step to a successful game that i have been working on for a while.
money=250
validbet=False
while validbet==False:
bet = None
while not bet:
unchecked_bet = input("How much would you like to bet? $")
try:
bet = float(unchecked_bet)
except ValueError:
print("Sorry, that is not a valid bet. Please enter a valid bet.".format(unchecked_bet))
bet=float(unchecked_bet)
if bet>=0 and bet<=money:
validbet=True
else:
print("Sorry, that is not a valid bet. Please enter a valid bet.")
validbet=False
print("You have bet: $"+str(bet))
Thanks in advance