I just want to receive some feedback on my code on things I can improve such as if my code can be cleaner or things I can add, anything helps!
import time import random rps = ("R","P","S") def stop(): while True: for i in range(1): break def score(): while True: time.sleep(1) print("\nThe Score\nWins -",counter_W,"\nLoses -",counter_L, "\nTies -", c_T) break def restart(): global rounds time.sleep(.5) rounds -= user_R while True: restart = input("\nType 'C' to Continue\nType 'Q' to Quit: ") restart = restart.upper() if restart == 'C': time.sleep(.5) game() elif restart == 'Q': print("\nEnding game...") stop() # Counters (Tie, Win, Loss) c_T = 0 counter_W = 0 counter_L = 0 rounds = 0 def game(): global c_T, counter_W, counter_L, rounds, user_R user_R = int(input("\nType the amount of rounds you would like to play: ")) while True: rps_R = random.choice(rps) time.sleep(.5) user = input("\nType 'R' for Rock\nType 'P' for Paper\nType 'S' for Scissors: ") user = user.upper() # Tie if user == 'R' and rps_R == 'R' or user == 'P' and rps_R == 'P' or user == 'S' and rps_R == 'S': c_T += 1 rounds += 1 print("\nUser has tied", c_T) # User Wins Rock if user == 'R' and rps_R == 'S': counter_W += 1 rounds += 1 print("\nUser has won:", counter_W) # User Wins Paper elif user == 'P' and rps_R == 'R': counter_W += 1 rounds += 1 print("\nUser has won:", counter_W) # User Wins Scissors elif user == 'S' and rps_R == 'P': counter_W += 1 rounds += 1 print("\nUser has won:", counter_W) # ----------------------------------- # User loses Rock if user == 'R' and rps_R == 'P': counter_L += 1 rounds += 1 print("\nUser has lost:", counter_L) # User Wins Paper elif user == 'P' and rps_R == 'S': counter_L += 1 rounds += 1 print("\nUser has lost:", counter_L) # User Wins Scissors elif user == 'S' and rps_R == 'R': counter_L += 1 rounds += 1 print("\nUser has lost:", counter_L) if rounds == user_R: score() restart() def intro(): print("Rock Paper Scissors Game") time.sleep(.1) print(" _____ _____ _____ ") print(" | __ \| __ \ / ____|") time.sleep(.1) print(" | |__) | |__) | (___ ") print(" | _ /| ___/ \___ \ ") time.sleep(.1) print(" | | \ \| | ____) | ") print(" |_| \_\_| |_____/ ") time.sleep(.1) print(" Coded by NectDz\n") def main(): intro() time.sleep(1) while True: start = input("Type 'Start' to begin: ") start = start.upper() if start == 'START': game() else : print("\nDid not understand restarting...\n") time.sleep(2) main() main()