Commit cf79a9d5 by BellCodeEditor

save project

parent 661f9a35
import random
pen=turtle.pen()
pen.write("妈妈您辛苦了!",font=("yimes",18,"normal"))
pen.hideturtle()
turtle.done()
\ No newline at end of file
import turtle
pen1=turtle.Pen()
pen1.pencolor("red")
pen1.pensize(5)
pen1.left(45)
pen1.forward(100)
pen1.circle(50,180)
pen1.right(90)
pen1.circle(50,180)
pen1.left(5)
pen1.forward(100)
pen1.hideturtle()
turtle.done()
import random import turtle
player=input("请出拳(石头/剪刀/布")) pen=turtle.Pen()
list=["石头","剪刀","布"] pen.write("妈妈您辛苦了!",font=("Times",18,"normal"))
compurter=ramdom.choice(list) pen1=turtle.Pen()
print("玩家请出拳:"+player) pen1.pencolor("red")
print("计算机请出拳:"+compurter) pen1.pensize(5)
if player in list: pen1.left(45)
if player==computer pen1.forward(100)
print(“平局”) pen1.circle(50,180)
elif player=="石头"and computer=="剪刀": pen1.right(90)
print(“平局”) pen1.circle(50,180)
elif (player=="石头"and computer=="剪刀")or(player=="剪刀"and computer=="布")or(player=="布"and computer=="石头") pen1.left(5)
print(“恭喜你,你赢了”) pen1.forward(100)
elif player=="布"and computer=="石头": pen1.hideturtle()
else turtle.done()
print(“很遗憾,你输了”)
else
print("输入错误")
\ No newline at end of file
import random
\ 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