Make your own Rock Paper Scissors with the code below! Input Code into Compiler in the link below to see the project:
https://www.programiz.com/python-programming/online-compiler/
print ("Welcome to rock, paper, scissors!")
moves = moves = ["rock\U0001F44A", "paper\U0000270B", "scissors\U0000270C"]
my_move = int(input ("What move do you want to play? Type 0 for rock, 1 for paper, or 2 for scissors"))
ai_move = random.randint(0, 2)
print ("You played " + moves[my_move])
print("AI played " + moves[ai_move])
#my_move = "rock"
#ai_move = "paper"
if my_move == 0:
if ai_move == 0:
print ("Play again!")
if ai_move == 1:
print("AI gets a point")
if ai_move == 2:
print ("You got a point")
if my_move == 1:
if ai_move == 0:
print ("You get a point")
if ai_move == 1:
print("Play again!")
if ai_move == 2:
print ("AI gets a point")
if my_move == 2:
if ai_move == 0:
print ("AI gets a point")
if ai_move == 1:
print("You get a point")
if ai_move == 2:
print ("Play again!")
Input Code into Compiler in the link below to see the project:
Python Code:
letters = ['a', 'b', 'c', 'd', 'e','f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9']
sCharacters = ['*', '&', '^', '!', '@', '#', '$', '%']
password= [0,0,0,0,0,0,0,0,0,0]
password[0] =random.choice(letters)
password[1] =random.choice(numbers)
password[2] =random.choice(sCharacters)
password[3] =random.choice(letters)
password[4] =random.choice(numbers)
password[5] =random.choice(sCharacters)
password[6] =random.choice(letters)
password[7] =random.choice(numbers)
password[8] =random.choice(sCharacters)
password[9] =random.choice(letters)
print(password)
Women's History Month!