Commit 0373f47a by BellCodeEditor

save project

parent 80fe9bbd
Showing with 33 additions and 11 deletions
# 玩家出拳b
import random
b=["石头","剪刀","布"]
a=input("请输入(石头/剪刀/布)")
print("玩家:"+a)
c=random.choice(b)
print("电脑:"+c)
if a=="石头",b=="剪刀":
pass
else:
pass
\ No newline at end of file
while True:
import random
b=["石头","剪刀","布"]
a=input("请输入(石头/剪刀/布)")
print("玩家:"+a)
c=random.choice(b)
print("电脑:"+c)
if a=="石头":
if b=="布":
print("you lost")
if b=="剪刀":
print("you win")
if b=="石头":
print("平局")
else:
if a=="剪刀":
if b=="布":
print("you win")
if b=="剪刀":
print("平局")
if b=="石头":
print("you lost")
else:
if a=="布":
if b=="布":
print("平局")
if b=="剪刀":
print("you lost")
if b=="石头":
print("you win")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment