Apologies for the noob question, I've only been programming for a month or so. I've created a Lucky 7s dice game, but when I tell it I don't want to play anymore, it continues asking. I think it has to do with on of the variables not being reassigned, but I'm not sure why. Here's the code I have written:
import random
#assign variables
times_played = 0
#prompt user to bet
print('Would you like to play Lucky 7s? Type Yes or No.')
playing = input()
if playing == 'Yes' or 'yes':
print('How much would you like to bet?')
user_total = int(input('$ '))
while playing == 'Yes' or 'yes':
die1 = random.randint(1,6)
die2 = random.randint(1,6)
dice_total = die1 + die2
if dice_total == 7:
print('You won $4!')
times_played += 1
user_total += 4
print('You have $', user_total, '.')
print('Would you like to keep playing?')
playing == input()
if playing == 'No' or playing =='no':
break
else:
print('Sorry, you lost.')
times_played += 1
user_total -= 1
print('You have $', user_total, '.')
print('Would you like to keep playing?')
playing == input()
if playing == 'No' or playing =='no':
break
print('Thanks for playing.')
print('You rolled', times_played, 'time(s).')