I'm trying to check input for a few conditions then converting the string into an integer, after this I want to make sure the integer is not negative otherwise prompt the user to input again.
it works with the string conditions , but when I type in a negative number input throws an error "input expected at most 1 arguments, got 2"
any ideas on how to evaluate this ?
#This compares whether the bet placed is greater than the value in the players chip_balance. It prompts the player for a lower bet if it is of greater value than chip_balance
while bet > chip_balance:
print('Sorry, you may only bet what you have 0 -', chip_balance)
bet = input("Place your bet: ")
while bet == '':
bet = input("Can't be an empty bet please try again ")
while bet.isalpha() or bet == '':
bet = input("Must be a numerical value entered \n \n Place You're bet:")
bet = int(bet)
if bet < 0:
bet = input("Sorry, you may only bet what you have sir! 0 \-", chip_balance)
bet = int(bet)