Commit 9a83e62f by BellCodeEditor

save project

parent 220fe62b
Showing with 45 additions and 0 deletions
# 玩家出拳
player=input("请出石头/剪刀/布")
print("玩家出"+player)
import random
list=["石头","剪刀","布"]
computer=random.choice(list)
print(computer)
if (player==computer):
print("平局")
elif (player=="石头" and computer=="布" ) or (player=="剪刀" and computer=="石头" ) or (player=="布" and computer=="剪刀" ):
print("你输了")
else :
print("你赢了")
\ No newline at end of file
import turtle
pen=turtle.Pen()
pen.left(90)
for i in range(4):
pen.forward(100)
pen.right(90)
pen.forward(100)
pen.right(30)
pen.forward(100)
for i in range(2):
pen.right(120)
pen.forward(100)
pen.penup()
pen.goto(50,40)
pen.pendown()
pen.setheading(90)
for i in range(4):
pen.forward(30)
pen.right(90)
pen.penup()
pen.goto(20,0)
pen.pendown()
for i in range(2):
pen.forward(60)
pen.right(90)
pen.forward(20)
pen.right(90)
turtle.done()
\ 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