Commit ab4a6cc6 by BellCodeEditor

save project

parent 284a0b44
Showing with 13 additions and 21 deletions
player=input("请出拳(石头/剪刀/布)") import turtle
print("玩家出拳:"+player) screen=turtle.Screen()
import random screen.bgcolor("light blue")
list=["剪刀","石头","布"] pen=turtle.Pen()
com=random.choice(list) pen.penup()
print(com) pen.goto(1000,-100)
if player==com: pen.write("Hi,诺依~\n用python写电子贺卡真是太有趣了~\n我也喜欢python~\n---悟空",font=("Times",20,"normal"))
print("平局") pen.hideturtle()
elif player=="剪刀" and com=="布": pen1=turtle.Pen()
print("玩家赢") pen1.pencolor("red")
elif player=="剪刀" and com=="石头": pen1.pensize(5)
print("玩家输") len=screen.textinput("提示","你想要多大的爱心呀?")
elif player=="布" and com=="石头": lov
print("玩家赢")
elif player=="布" and com=="剪刀":
print("玩家输")
elif player=="石头" and com=="剪刀":
print("玩家赢")
elif player=="石头" and com=="布":
print("玩家输")
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