Commit b7400628 by BellCodeEditor

save project

parent b5c6bbbe
Showing with 36 additions and 0 deletions
import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
list=["石头","剪刀","布"]
computer=random.choice(list)
print("电脑出拳:"+computer)
if player in list:
if player==computer:
print("平局")
elif (player=="石头" and computer=="剪刀") or(player=="剪刀" and computer=="布") or (player=="布" and computer=="剪刀"):
print("赢")
else:
print("输")
else:
print("重新输入")
import turtle
pen=turtle.Pen()
pen1=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("light blue")
pen.penup()
pen.write("你好",font=("Times",30,"normal"))
pen1.hideturtle()
pen.goto(-100,0)
pen.pendown()
pen.pencolor("red")
pen.left(45)
pen.forward(100)
pen.circle(50,180)
pen.right(90)
pen.circle(50,180)
pen.forward(100)
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