Commit 5664eecf by BellCodeEditor

save project

parent 0766869d
Showing with 17 additions and 29 deletions
player=input("请出拳(石头/剪刀/布)") import turtle
print("玩家出拳"+player) # pen=turtle.Pen()
# pen.write("HADJB",font=("Times",100,"normal"))
# pen.hideturtle()
# turtle.done()
import random pen1=turtle.Pen()
list=["剪刀","石头","布"] pen1.poncolor("red")
computer=random.choice(list) pen1.ponsize()
print(computer) pen1.left(45)
pen1.forward(100)
if player==computer: pen1.circle(180)
print("平局") pen1.right(90)
elif player=="石头" and computer=="剪刀": pen1.circle(180)
print("你赢了") pen1.forward(50.180)
elif palyer=="剪刀" and computer=="石头": pen1.hideturtle()
print("你赢了") turtle.dony
elif palyer=="剪刀" and computer=="布": \ No newline at end of file
print("你赢了")
else:
print("你死了")
\ No newline at end of file
if player==computer:
print("平局")
elif player=="石头"and computer=="剪刀":
print("恭喜,你赢了")
elif player=="剪刀"and computer=="布"
print("恭喜,你赢了)
elif player==""and computer=="石头":
print("恭喜你,你赢了")
else:
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