rock paper scissors

Solutions on MaxInterview for rock paper scissors by the best coders in the world

showing results for - "rock paper scissors"
Isabella
30 Jan 2021
1My Rock Paper Scissor game:
2https://codepen.io/Lorenzo-SC/pen/ExgpPEO
3Please give me a like if you appreciate :)
Roddy
24 Jan 2021
1import random
2
3print('Get ready for rock,paper,scissors')
4user = input('Enter your element:')
5element = ['I choose Rock', 'I choose Paper', 'I choose Scissors']
6AI = random.choice(element)
7print(AI)
8# Ties
9if AI == str('I choose Rock') and user == str('rock'):
10    print('Its a tie')
11if AI == str('I choose Paper') and user == str('paper'):
12    print('Its a tie')
13if AI == str('I choose Scissors') and user == str('scissors'):
14    print('Its a tie')
15# Rock AI
16if AI == str('I choose Rock') and user == str('paper'):
17    print('You won')
18if AI == str('I choose Rock') and user == str('scissors'):
19    print('You lost')
20# Rock user
21if AI == str('I choose Paper') and user == str('rock'):
22    print('You lost')
23if AI == str('I choose Scissors') and user == str('rock'):
24    print('You won')
25# Paper AI
26if AI == str('I choose Paper') and user == str('rock'):
27    print('You lost')
28if AI == str('I choose Paper') and user == str('scissors'):
29    print('You won')
30# Paper user
31if AI == str('I choose Rock') and user == str('paper'):
32    print('You won')
33if AI == str('I choose Scissors') and user == str('paper'):
34    print('You lost')
35# Scissors AI
36if AI == str('I choose Scissors') and user == str('paper'):
37    print('You lost')
38if AI == str('I choose Scissors') and user == str('rock'):
39    print('You won')
40# Scissors user
41if AI == str('I choose Paper') and user == str('scissors'):
42    print('You won')
43if AI == str('I choose Rock') and user == str('scissors'):
44    print('You lost')
45
46
47def restartgame():
48    print('Get ready for rock,paper,scissors')
49    user = input('Enter your element:')
50    element = ['I choose Rock', 'I choose Paper', 'I choose Scissors']
51    AI = random.choice(element)
52    print(AI)
53    # Ties
54    if AI == str('I choose Rock') and user == str('rock'):
55        print('Its a tie')
56    if AI == str('I choose Paper') and user == str('paper'):
57        print('Its a tie')
58    if AI == str('I choose Scissors') and user == str('scissors'):
59        print('Its a tie')
60    # Rock AI
61    if AI == str('I choose Rock') and user == str('paper'):
62        print('You won')
63    if AI == str('I choose Rock') and user == str('scissors'):
64        print('You lost')
65    # Rock user
66    if AI == str('I choose Paper') and user == str('rock'):
67        print('You lost')
68    if AI == str('I choose Scissors') and user == str('rock'):
69        print('You won')
70    # Paper AI
71    if AI == str('I choose Paper') and user == str('rock'):
72        print('You lost')
73    if AI == str('I choose Paper') and user == str('scissors'):
74        print('You won')
75    # Paper user
76    if AI == str('I choose Rock') and user == str('paper'):
77        print('You won')
78    if AI == str('I choose Scissors') and user == str('paper'):
79        print('You lost')
80    # Scissors AI
81    if AI == str('I choose Scissors') and user == str('paper'):
82        print('You lost')
83    if AI == str('I choose Scissors') and user == str('rock'):
84        print('You won')
85    # Scissors user
86    if AI == str('I choose Paper') and user == str('scissors'):
87        print('You won')
88    if AI == str('I choose Rock') and user == str('scissors'):
89        print('You lost')
90    again = input('Would you like to play again')
91    if again == str('yes'):
92        restartgame()
93    if again == str('no'):
94        raise SystemExit(0)
95
96
97again = input('Would you like to play again')
98if again == str('yes'):
99    restartgame()
100if again == str('no'):
101    raise SystemExit(0)
102
queries leading to this page
rock paper scissorrock paper scissors uses machine learningplaying rock paper scissorsrock paper scissors simulatorrock paper scissors diagramrock paper and scissors simple webrock paper scissors images freerock paper scissors drawrock paper scissors ruleswhen was rock paper scissors inventedrock paper scissors game rulesrock paper scissors algorithmrock paper scissors code picrock paper scissors boot stripes rock paper scissors online gamerock paper scissors coderock paper scissors using machine learningrock 2c paper scissors coderock paper scissors game code rock scissors paper source coderock paper scissors theoryrock paper scissors game ml where did you learn rock paper scissorsrock paper scissors pic rockrock image for rock paper scissorsrock paper scissors moviescissors image in rock paperrock paper scissors game conceptrock paper scissors symbolswhere did rock paper scissors originaterock paper scissors solutionrock paper scissors gorock paper scissors assetsrock paper scissors image singlerock paper scissors videorock paper scissors according to game theoryrock paper scissors statisticsrock paper scissors mr beasthow big procential chance is it to iwn in rock paper scissor 20 times in a rowhow to code rock paper scissorsrock paper scissors game jsrock 2c paper 2c scissors paper imagerock paper scissors examplerock paper scissors images downloadpaper rocks scissorsrock paper scissors picrock paper scissors projectrock paper scissors game rock imagerock paper scissors comrock paper scissors images setstatistics of rock paper scissorsrock paper scissors imagerock paper scissors gonbuild a rock paper scissors gamerock paper scissors possible outrock paper scissors frontendrock paper scissors masterrock paper scissors jsrock paper scissorsrock paper scissors extrarock 2c paper 2c scissors coderock paper scissors instructionsrock paper scissors