Commit e1a78026 by BellCodeEditor

save project

parent 303b21da
Showing with 13 additions and 3 deletions
...@@ -18,8 +18,18 @@ a.done() ...@@ -18,8 +18,18 @@ a.done()
''' '''
a = input("请出拳:石头/剪刀/布") a = input("请出拳:石头/剪刀/布")
print("玩家出拳:" + a) u = input("123")
print("玩家出拳:" + a)
import random import random
a = ["石头","剪刀","布"] a = ["石头","剪刀","布"]
s = random.choice(a) s = random.choice(a)
print(s) if s == u:
\ No newline at end of file print("平局")
elif s == "剪刀" and s=="布"
print("胜利")
elif s == "布" and s=="石头"
print("胜利")
elif flif s == "石头" and s=="剪刀"
print("胜利")
else:
print("输了")
\ 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