import random
coin=0
kati=0
def ran_choice():
global room
room=random.choice([ "✊","✌","✋"])
my_choice=int(input("何を出しますか?【1】✊【2】✌【3】✋")) ran_choice()
def gu_kumi():
global kati
global coin
if room=="✌":
coin=coin+1 kati=1 tyoki() elif room=="✋": coin=coin-1 kati=-1 pa() elif room=="✊": gu()
def tyoki_kumi():
global kati
global coin
if room=="✌": tyoki() elif room=="✋": coin=coin+1 kati=-1 pa() elif room=="✊": coin=coin-1 kati=-1 gu()
def pa_kumi():
global kati
global coin
if room=="✌":
kati=-1
coin=coin-1
tyoki()
elif room==" ✋":
pa()
elif room== "✊": coin=coin+1 kati=1 gu()
def tyoki():
global kati
print("✌")
if kati>0:
print("貴方の勝ち")
elif kati<o:
print("私の勝ち")
elif kati==0:
ran_choice()
def gu():
global kati
print("✊")
if kati>0:
print("貴方の勝ち")
elif kati<o:
print("私の勝ち")
elif kati==0:
ran_choice()
def pa():
global kati
print("✋")
if kati>0:
print("貴方の勝ち")
elif kati<o:
print("私の勝ち")
elif kati==0:
ran_choice()
if my_choice==1:
gu_kumi()
elif my_choice==2:
tyoki_kumi()
elif my_choice==3:
pa_kumi()
回答1件
あなたの回答
tips
プレビュー