How do I ask the user if they want to play again and repeat the while loop?
My code has this while true: user = input ("Please enter 1, 2, or 3: ") if user == comp print ("Tie game!") Elif (user == "1") and (comp == "2") print ("You lose!") break else: print ("Your choice is not valid.") Also how do I exit out of this loop because after entering a correct input it keeps asking "Please input 1, 2, 3"? And how do I ask if the player wants to play again? Is this a nested loop? Pseudopod: play again = input ("If you'd like to play again, please type 'yes'") if play again == "yes" start loop again else: exit program running on Python
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here