Commit c28ff6ec by BellCodeEditor

save project

parent 0e9cf7f8
Showing with 26 additions and 21 deletions
import random import turtle
pen=turtle.Pen()
pler=input("请出拳:石头/剪刀/布")# 玩家出拳 pen.write("你好\n诺伊",font=("Times",50,"normal"))
print("玩家出拳:"+pler) pen.hideturtle()
list= ["石头","剪刀","布"] pen1=turtle.Pen()
com=random.choice(list) pen1.pensize(5)
print("电脑出拳"+com) pen1.pencolor("red")
if pler in list: pen1.left(45)
if pler==com: pen1.forward(100)
print("平局") pen1.circle(50,180)
elif pler=="石头"and com=="剪刀": pen1.right(90)
print("玩家赢了") pen1.circle(50,180)
elif pler=="剪刀"and com=="布": pen1.forward(100)
print("玩家赢了") turtle.done()
elif pler=="布"and com=="石头": \ No newline at end of file
print("玩家赢了")
else:
print("玩家输了")
else:
print("素")
\ No newline at end of file
import turtle
pen1=turtle.Pen()
pen1.pensize(5)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(100)
pen1.circle(50,180)
pen1.right(90)
pen1.circle(50,180)
pen1.forward(100)
turtle.done()
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