What it does- Bot to play Rock, Paper, Scissors
import random player = input("Player ,make your move: ").lower() rand_num=random.randint(0,2) if rand_num==0: computer = "rock" elif rand_num == 1: computer = "paper" else: computer="scissors" print(f"Computer plays {computer}") if player=="rock": if computer=="scissors": print("player won") elif computer=="paper": print("computer won") else: print("TIE!!!") elif player=="paper": if computer=="scissors": print("computer won") elif computer=="rock": print("player won") else: print("TIE!!!") elif player=="scissors": if computer=="rock": print("computer won") elif computer=="paper": print("player won") else: print("TIE!!!") else: print("some thing went wrong")
Log in or sign up for Devpost to join the conversation.