Commit 139bcff0 by BellCodeEditor

save project

parent f4d7a9f2
Showing with 20 additions and 2 deletions
import turtle
Pen=turtle.Pen()
l=1
for i in range(2500):
Pen.forward(l)
Pen.right(91)
l=l+0.9
turtle.done()
\ No newline at end of file
...@@ -3,4 +3,13 @@ player=input("请出拳:") ...@@ -3,4 +3,13 @@ player=input("请出拳:")
print("玩家出了:"+player) print("玩家出了:"+player)
i=["石头","剪刀","布"] i=["石头","剪刀","布"]
computer=random.choice(i) computer=random.choice(i)
print("机器人出了"+computer) if player in i:
\ No newline at end of file print("机器人出了"+computer)
if player==computer:
print("平局")
elif (player=="石头"and computer=="剪刀") or (player=="剪刀"and computer=="布")or(player=="布"and computer=="石头"):
print("玩家胜利")
else:
print("机器人胜利")
else:
print("玩家出拳不规范,重来")
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