Commit fed6071f by BellCodeEditor

save project

parent 816996be
Showing with 19 additions and 13 deletions
player=input("玩家出拳 石头/剪刀/布") import turtle
print("玩家出拳"+player) pen=turtle.Pen()
import random as r
list=("石头","剪刀","布")
com=r.choice(list) pen.pensize(5)
print("电脑出拳"+com) pen.pencolor("pink")
if com==player: pen.left(45)
print("平局") pen.forward(100)
elif com=="石头" and player=="布" or com=="布" and player=="剪刀" or com=="剪刀" and player=="石头": pen.circle(50,180)
print("你赢了") pen.right(90)
elif com=="布" and player=="石头" or com=="剪刀" and player=="布" or com=="石头" and player=="剪刀": pen.circle(50,180)
print("你输了") pen.forward(100)
\ No newline at end of file pen.penup()
pen.goto(100,0)
pen.write("hi,nuo yi, 我想为你吟一首四季诗",font=("Times",30,"normal"))
pen.hideturtle()
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