Commit 498a7751 by BellCodeEditor

save project

parent aa01dcd6
Showing with 17 additions and 10 deletions
import turtle import turtle
pen=turtle.Pen() pen=turtle.Pen()
pen.fillcolor("red")
pen.begin_fill()
for i in range(300):
pen.color("red")
pen.forward(1)
pen.left(1)
pen.end_fill()
turtle.done()
...@@ -4,4 +4,20 @@ print("玩家出"+a) ...@@ -4,4 +4,20 @@ print("玩家出"+a)
import random import random
b=["石头","剪刀","布"] b=["石头","剪刀","布"]
c=random.choice(b) c=random.choice(b)
print("计算机出拳"+c) print("计算机出拳"+c)
\ No newline at end of file if a==c:
print("平局")
elif (a=="石头" and c=="剪刀") or (a=="布" and c=="石头") or (a=="剪刀" and c=="布"):
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