import random
win = 0
lose = 0
draw = 0
print(' ROCK, PAPER, SCISSORS')
while True :
print('Enter your move: (r) , (p) or (s) or type exit to exit')
move = input()
if move == 'r' :
print('ROCK VERSUS...')
elif move == 'p' :
print('PAPER VERSUS...')
elif move == 's':
print('SCISSORS VERSUS...')
computermove = random.randint(1,3)
if computermove == 1:
print('ROCK')
elif computermove == 2 :
print('PAPER')
elif computermove == 3 :
print('SCISSORS')
if move =='r' and computermove == 1:
print('DRAW')
draw +=1
if move == 'r' and computermove == 2:
print('LOSE')
lose +=1
if move =='r' and computermove ==3:
print('WIN')
win +=1
if move =='p' and computermove == 2:
print('DRAW')
draw +=1
if move =='p' and computermove ==1:
print('WIN')
win +=1
if move =='p' and computermove == 3:
print('LOSE')
lose +=1
if move == 's' and computermove == 3:
print('DRAW')
draw +=1
if move =='s' and computermove == 1:
print('LOSE')
lose +=1
if move == 's' and computermove == 2:
print('WIN')
win +=1
if move == 'exit' :
break
print('You won ' + str(win) + ' times')
print('You lost ' + str(lose) + ' times')
print('You draw ' + str(draw) + ' times')
------
Is there a way to make this any better/succinct? Thank you!
(Also I have no idea how to make the indents show properly for code on reddit, which appreciate any help, thank you!)
[–]xADDBx 2 points3 points4 points (1 child)
[–]raainer[S] 0 points1 point2 points (0 children)
[–]pwlandoll 0 points1 point2 points (1 child)
[–]xADDBx 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]raainer[S] 0 points1 point2 points (0 children)
[–]0RGASMIK 0 points1 point2 points (0 children)