import random import time player = " " computer = 0 player_score = 0 computer_score = 0 def rules(): print( "Rules-----------------------" ) print( "Rock beats scissors" ) print( "Paper beats rock" ) print( "Scissors beat paper" ) print( "Same is draw" ) def get_input(): global player while True: print( " " ) player = input( "What do you pick? (r/p/s): ") if player == "r" or player == "p" or player == "s": print("xfgh") break else: print("Do you need to read the rules again? (y/n)") if input() == "y": rules() def computer_pick(): global computer computer = random.randint(1,3) def start(): print("Are you ready? (y/n) ") if input() == "y": time.sleep(1) print("3") time.sleep(1) print("2") time.sleep(1) print("1") time.sleep(1) print("Go!") else: print("Ok") time.sleep(2) start() def show_score(): print("The score is {} to {}".format(player_score,computer_score)) def who_won(): if player == "r": if computer == 1: tie() def tie(): print( "Tie!" ) print( "Try again" ) def player_won(): print( " The Computer won!") computer_score = computer_score + 1 def computer_won(): print( " The Computer won!") computer_score = computer_score + 1 get_input() computer_pick