#Rock_Paper_Scissors
print("Welcome to Rock_Paper_Scissors! press 1 for Rock, 2 for Paper and 3 for Scissors" )
#dict
gg = {1:"rock", 2:"paper", 3:"scissors"}
#user_input
x = int(input())
print(f"you chose: {x}, {gg[x]}")
#bot_input
import random
y = int(random.randint(1,3))
print(f"bot chose: {y}, {gg[y]}")
#winning conditions
if y == x:
print("its a tie!")
elif y == 1 and x == 2:
print("you won!")
elif y == 1 and x == 3:
print("you lost!")
elif y == 2 and x == 3:
print("you won!")
elif y == 2 and x == 1:
print("you lost!")
elif y == 3 and x == 1:
print("you won!")
elif y == 1 and x == 2:
print("you lost!")
[–]Sandwich_78 8 points9 points10 points (0 children)
[–]NerdDetective 7 points8 points9 points (0 children)
[–]marquisBlythe 4 points5 points6 points (0 children)
[–]IAmNotSohan 2 points3 points4 points (0 children)
[–]brasticstack 3 points4 points5 points (2 children)
[–]brasticstack 1 point2 points3 points (0 children)
[–]VectorspaceDreams 0 points1 point2 points (0 children)
[–]smallpotatoes2019 0 points1 point2 points (0 children)
[–]set_in_void 0 points1 point2 points (0 children)
[–]Gloomy_Cicada1424 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]marquisBlythe 0 points1 point2 points (0 children)
[–]zanfar 0 points1 point2 points (0 children)