Commit a28fdab8 by BellCodeEditor

save project

parent a656a0f7
Showing with 11 additions and 3 deletions
...@@ -2,7 +2,14 @@ ...@@ -2,7 +2,14 @@
sb=input("玩家出拳(石头,剪刀,布):") sb=input("玩家出拳(石头,剪刀,布):")
print("玩家出拳"+sb) print("玩家出拳"+sb)
import random import random
sb=random.choice() ben=random.choice()
list["石头","剪刀","布"] list["石头","剪刀","布"]
sb=random.choice(list) ben=random.choice(list)
print()"sb") print"电脑出拳"+"ben")
if sb ==ben
print("平局")
elif sb=="剪刀" and ben=="石头" or sb=="石头" and ben=="布" or sb==" 布" and ben=="剪刀"
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