Commit d87433bd by BellCodeEditor

save project

parent 421c3481
Showing with 13 additions and 6 deletions
...@@ -12,8 +12,15 @@ pen.end_fill() ...@@ -12,8 +12,15 @@ pen.end_fill()
turtle.done() turtle.done()
''' '''
import random import random
s=input("请玩家出拳(石头,剪刀,布):") while True:
print("玩家出拳为"+s) s=input("请玩家出拳(石头,剪刀,布):")
list11=["石头","剪刀","布"] print("玩家出拳为"+s)
cll=random.choice(list11) list11=["石头","剪刀","布"]
print("电脑出拳为"+cll) cll=random.choice(list11)
\ No newline at end of file print("电脑出拳为"+cll)
if s==cll:
print("平局!")
elif (s=="石头"and cll=="剪刀" )or(s=="剪刀"and cll=="布") or (s=="布"and cll=="石头"):
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