Commit 182d428b by BellCodeEditor

save project

parent f47689a4
Showing with 236 additions and 0 deletions
a={"老六":200,"dog":200}
a["老六"]=100
a["cat"]=55
k=input("你想要什么")
if k in dict:
print(dict[k])
\ No newline at end of file
class Hero:
def __init__(self,name,hp,gj):
self.level = 1
self.name = name
self.hp = hp
self.gj = gj
def upgrade(self):
self.level = self.level + 1
self.gj = self.gj + 4
self.hp = self.hp + 50
YaSe = Hero("亚瑟",200,300)
YaSe.upgrade()
YaSe.upgrade()
YaSe.upgrade()
YaSe.upgrade()
print(YaSe.hp)
print(YaSe.gj)
print(YaSe.level)
print(YaSe.name)
\ No newline at end of file
import turtle
import turtle
t=turtle.Turtle()
t.speed(0)
t.pensize(4)
t.hideturtle()
t.fillcolor("#00A1E8")
t.begin_fill()
t.circle(120)
t.end_fill()
t.pensize(3)
t.fillcolor("white")
t.begin_fill()
t.circle(100)
t.end_fill()
t.penup()
t.home()
t.goto(0,134)
t.pendown()
t.pensize(4)
t.fillcolor("#EA0014")
t.begin_fill()
t.circle(18)
t.end_fill()
t.penup()
t.goto(7,155)
t.pensize(2)
t.color("white","white")
t.pendown()
t.begin_fill()
t.circle(4)
t.end_fill()
t.penup()
t.goto(-30,160)
t.pensize(4)
t.pendown()
t.color("black","white")
t.begin_fill()
a=0.4
for i in range(120):
if 0 <=i < 30 or 60 <= i < 90:
a=a+0.08
t.left(3)
t.forward(a)
else:
a-=0.08
t.left(3)
t.fd(a)
t.end_fill()
t.penup()
t.goto(30,160)
t.pensize(4)
t.pendown()
t.color("black","white")
t.begin_fill()
a=0.4
for i in range(120):
if 0 <=i < 30 or 60 <= i < 90:
a=a+0.08
t.left(3)
t.forward(a)
else:
a-=0.08
t.left(3)
t.fd(a)
t.end_fill()
t.penup()
t.goto(-38,190)
t.pensize(8)
t.pendown()
t.rt(-30)
t.fd(15)
t.rt(70)
t.fd(15)
t.penup()
t.goto(15,185)
t.pensize(4)
t.pendown()
t.color("black","black")
t.begin_fill()
t.circle(13)
t.end_fill()
t.penup()
t.goto(13,190)
t.pensize(2)
t.pendown()
t.color("white","white")
t.begin_fill()
t.circle(5)
t.end_fill()
t.penup()
t.home()
t.goto(0,134)
t.pensize(4)
t.pencolor("black")
t.pendown()
t.rt(90)
t.fd(40)
t.penup()
t.home()
t.goto(0,124)
t.pensize(3)
t.pencolor("black")
t.pendown()
t.left(10)
t.fd(80)
t.penup()
t.home()
t.goto(0,114)
t.pensize(3)
t.pencolor("black")
t.pendown()
t.left(6)
t.fd(80)
t.penup()
t.home()
t.goto(0,104)
t.pensize(3)
t.pencolor("black")
t.pendown()
t.left(0)
t.fd(80)
t.penup()
t.home()
t.goto(0,124)
t.pensize(3)
t.pencolor("black")
t.pendown()
t.left(170)
t.fd(80)
t.penup()
t.home()
t.goto(0,114)
t.pensize(3)
t.pencolor("black")
t.pendown()
t.left(174)
t.fd(80)
t.penup()
t.home()
t.goto(0,104)
t.pensize(3)
t.pencolor("black")
t.pendown()
t.left(180)
t.fd(80)
t.penup()
t.home()
t.goto(-70,70)
t.pendown()
t.color("black","red")
t.pensize(6)
t.setheading(-60)
t.begin_fill()
t.circle(80,40)
t.circle(80,80)
t.end_fill()
t.penup()
t.home()
t.goto(-80,70)
t.pendown()
t.fd(160)
t.penup()
t.home()
t.goto(-50,50)
t.pendown()
t.pensize(1)
t.fillcolor("#eb6e1a")
t.setheading(40)
t.begin_fill()
t.circle(-40,40)
t.circle(-40,40)
t.setheading(40)
t.circle(-40,40)
t.circle(-40,40)
t.setheading(220)
t.circle(-80,40)
t.circle(-80,40)
t.end_fill()
t.penup()
t.goto(-70,12)
t.pensize(14)
t.pencolor("red")
t.pendown()
t.setheading(-20)
t.circle(200,30)
t.circle(200,10)
t.penup()
t.goto(0,-46)
t.pendown()
t.pensize(3)
t.color("black","#f8d102")
t.begin_fill()
t.circle(25)
t.end_fill()
t.penup()
t.goto(-5,-40)
t.pendown()
t.pensize(2)
t.color("black","#79675d")
t.begin_fill()
t.circle(5)
t.end_fill()
t.pensize(3)
t.rt(115)
t.fd(7)
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