Commit 4a3ecb6a by BellCodeEditor

save project

parent 69b11036
Showing with 15 additions and 17 deletions
# 玩家出拳 import turtle
player=input("你来(石头/剪刀/布)")
print(player)
import random pen1=turtle.Pen()
list=["石头","剪刀","布"] pen1.pencolor("red")
computer=random.choice(list) pen1.pensize(5)
print(computer) pen1.left(45)
if player in list: pen1.forward(100)
if player==computer: pen1.circle(50,180)
print("平局") pen1.right(90)
elif (player=="石头" and computer=="剪刀")or(player=="布"and computer=="石头")or(player=="剪刀"and computer=="布"): pen1.circle(50,180)
print("你赢") pen1.forward(100)
else: pen1.hideturtle()
print("你输") turtle.done()
else: \ No newline at end of file
print("错")
\ 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