When I try to run my code it says:
if again == "y":
^
TabError: inconsistent use of tabs and spaces in indentation
My code is:
import random
def game():
wrong_guesses = [1,2,3,4,5]
num = random.randint(0,100)
guess = input("Guess a number bewtween 1 and 100, you have five tries ")
def wrong_guess():
wrong_guesses.remove()
print("That is not the number, You have {} guesses left".format(len(wrong_guesses)))
def right_guess():
if guess == num:
print("Congratulations! You guessed the number. You had {} guesses left".format(len(wrong_guesses)))
play_again()
def game_over():
if len(wrong_guesses) == 0:
break
play_again()
def play_again():
again = input("Would you like to play again? [y/n}")
if again == "y":
game()
elif again == "n":
break
game()