Syntax error I get is invalid syntax: else: ^
import random
num = random.randint(1, 7)
def dice_roll():
gold = 0
input = ('Do you want to play again?' )
if num == 2:
gold = (gold + 2)
print (gold)
print ('You Win!')
print (input)
if input != ('yes'):
dice_roll()
else:
print ('Loser')
dice_roll()
Aucun commentaire:
Enregistrer un commentaire