def check_guess(guess, answer):
      global score
      still_guessing = True
      attempt = 0
      while still_guessing and attempt < n:
        if guess.lower() == answer.lower():
          print("Correct Answer")
          score = score + b
          still_guessing = False
        else:
          if attempt < a:
            guess = input("Sorry Wrong Answer, try again")
          attempt = attempt + b
      if attempt == n:
        print("The Correct answer is ",answer )

      Python language logo
      checkGuess

      CodeSnippets

      def check_guess(guess, answer): global score still_guessing = True attempt = 0 while still_guessing and attempt < n: if guess.lower() == answer.

      Shortcut: guess.Game

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.