While loop not working

Hello, I’ve been having an issue with this while loop that i’ve tried to insert into my blackjack terminal game. When inserted, 1 of two things happen. The while loop is conditioned to run when the bet is greater than 0, however when the bet is greater than zero, it proceeds to print numbers continuously. When the number is = 0, the program still runs, but with printing numbers continously. Can anyone help me figure out how to implement a while loop into the code that works properly?


You could fix some of that by asking for a new bet at the end of the while loop,
you could put the code for that inside the loop.

  bet = int(input('How much would you like to bet ' + name + "? \n")) 
  if bet == 0:
    print("I hope you've enjoyed! Goodbye")

is the code you already used to do that at the beginning.

I also recommend putting the code for drawing cards inside the loop (probably at the beginning), so that there’s new cards drawn in each round.

Do you know how I can reset all of the variables in the end? Should I just use (+=)?

Use = to reset the values to a specific number or input, not +=