Commit 345379f7 by BellCodeEditor

auto save

parent bd3369f6
Showing with 73 additions and 24 deletions
import turtle
a=turtle.Pen()
a.pensize(10)
a.penup()
a.goto(0,-50)
a.pendown()
a.color("red")
a.circle(100)
a.left(90)
a.forward(200)
a.right(180)
a.forward(100)
a.left(90)
a.forward(100)
a.left(180)
a.forward(200)
turtle.done()
\ No newline at end of file
# 玩家出拳 import turtle
import random a=turtle.Pen()
a=input("你出什么(石头/剪刀/布)!") a.pensize(10)
print("玩家出拳:"+a) a.penup()
list=["石头","剪刀","布"] a.goto(-100,0)
b=random.choice(list) a.pendown()
print(b) a.color("blue")
if a in list: a.circle(50)
if b==a: a.penup()
print("平局") a.goto(20,0)
elif b=="石头" and a=="剪刀": a.pendown()
print("你已经死了") a.color("black")
elif b=="布" and a=="石头": a.circle(50)
print("你已经死了") a.penup()
elif b=="剪刀" and a=="布": a.goto(140,0)
print("你已经死了") a.pendown()
elif b=="剪刀" and a=="石头": a.color("red")
print("you win") a.circle(50)
elif b=="布" and a=="剪刀": a.penup()
print("you win") a.goto(-40,-70)
elif b=="石头" and a=="布": a.pendown()
print("you win") a.color("yellow")
else: a.circle(50)
print("输入错误") a.penup()
a.goto(80,-70)
a.pendown()
a.color("green")
a.circle(50)
turtle.done()
\ No newline at end of file
import turtle
a=turtle.Pen()
a.penup()
a.goto(0,-50)
a.pendown()
a.fillcolor("red")
a.begin_fill()
a.circle(50)
a.end_fill()
a.penup()
a.goto(-150,100)
a.pendown()
a.forward(300)
a.right(90)
a.forward(200)
a.right(90)
a.forward(300)
a.right(90)
a.forward(200)
turtle.done()
\ No newline at end of file
SB=input("大智者数字是撒: ")
print("百: "+SB[0]+"十: "+SB[1]+"个: "+SB[2])
\ No newline at end of file
import random
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