janken.py
import random
import time
win = 0
lose = 0
draw = 0
while win < 3:
time.sleep(2)
print('\n最初はグー・・・')
time.sleep(1)
print('じゃんけん・・\n')
time.sleep(1)
you = int(input('1:グー\n2:チョキ\n3:パー\n'))
com = random.randint(1,3)
time.sleep(1)
print('\nあなた:'+str(you)+'\nコンピュータ:'+str(com))
r = (com-you+3)%3
time.sleep(1)
if r == 0:
print('\ndraw')
draw += 1
elif r == 2:
print('\nlose..')
lose += 1
else:
print('\nwin!')
win += 1
print('\n'+str(win)+'勝'+str(lose)+'敗'+str(draw)+'引き分け')