Oct-06-2018, 02:13 PM
Hello wondering if someone could help, I'm kinda new to the whole coding thing and can't work out what I've done wrong. The code below should allow a user(already completed this part) to guess the name of a random song. they need to have 3 attempts.
Thanks for the support.
Thanks for the support.
Song = "This is a song" guess = input("What song is it?") score = 0 guesscount = 0 guesscount += 1 while guess == guess: if guesscount == 3: print("You have had the maximum number of guesses, goodbye!") quit() elif guess == Song and guesscount == 1: print("Well done,you guessed correctly!") score += 3 break elif guess == Song and guesscount == 2: print("Second time was the charm! You guessed correctly... this time.") score += 1 break elif guess != Song: print("Your guess was incorrect!") guess == input("What song is it?") guesscount += 1 continue