Commit cf3a9157 by BellCodeEditor

save project

parent 0ac1701f
Showing with 23 additions and 8 deletions
...@@ -7,12 +7,27 @@ ...@@ -7,12 +7,27 @@
# fd(100) # fd(100)
# rt(144) # rt(144)
# done() # done()
import random
p = input("请出拳/剪刀/石头/布") p = input("请出拳/剪刀/石头/布")
print(p) print("玩家出拳"+p)
l = ["剪刀","石头","布"]
c = random.choice(l)
print("电脑出拳"+c)
if p == c:
elif p=='石头'
if c=='剪刀'
print("玩家赢")
if c=='布'
elif p=='剪刀'
if c=='布'
print("玩家赢")
if c=='石头'
print("赢")
elif p=='石头'
if c=='剪刀'
print("玩家赢")
if c=='布'
elif p=='石头'
if c=='剪刀'
print("玩家赢")
if c=='布'
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