Debugging tool built into the python shell

Debugging tool built into the python shell
0

I have an assignment to use the built in debugging tool in the shell but I have no clue how to interpret what is wrong with the code aside from obvious such as the it asks for heads or tails but the flip is a random variant.
Using the file “coinFlipWrong.py” use the debugger and find all the problems. Identify the problem and recommend how to fix. Write up your answer in electronic form (i.e. Word) using this format for each of the problems you find:

  • Problem Title

  • Problem Description

  • Line No

  • Recommendation

here is the code I am supposed to use:

#Coin Flipping game - user guesses heads or tails
# (0 = HEADS and 1 = TAILS)
import random

#variables for game
userGuess = ""
flipResults = ["tails", "heads"]
playGame = 'y'
noCorrect = 0
noWrong = 0

while(playGame=='y'):
    #get the user's guess
    while userGuess not in flipResults:
        userGuess = input("Pick heads or tails : ")
        userGuess = userGuess.lower()

    #flip the coin
    flip = random.randint(0,1)

    #see if user is correct
    if(flipResults == userGuess):
        print("You guessed it!")
        noCorrect = noCorrect + 1
    else:
        print("Sorry you did not guess correctly")
        noWrong = noWrong + 1

print("Thank you for playing !!!")
print("You guessed " + str(noCorrect) + " Correctly.")
print("You guessed " + str(noWrong) + " Incorrectly.")

What is the debugging tool telling you?

Really I just don’t understand how to use it. What part tells you something is wrong with the code?

You did not learn about the debugger in your class?

No, the teachers idea of explaining it was to show 5 pp slides and explain what the buttons did but not how to actually use it! If someone would just explain how to tell when there is a problem (like which part is it in)? I could find the issues myself but without understanding how this tool works I don’t even know where to begin!