Commit 5b84420b by BellCodeEditor

auto save

parent 1cf9f5c8
Showing with 22 additions and 17 deletions
class Dog: # 狗类
def __init__(self):
self.footNum = 4 # 腿
self.eyeNum = 2 # 眼睛
self.head = 1 # 头
self.earsNum = 2 # 耳朵
self.skin = "white"
import turtle
a=int(input("想要多大的爱心"))
s=turtle.Screen()
s.bgcolor("light yellow")
p1=turtle.Pen()
p1.penup()
p1.goto(100,-100)
p1.write("危楼高百尺,\n手可摘星辰。",font=("Times",20,"normal"))
p1.hideturtle()
p2=turtle.Pen()
p2.fillcolor("red")
p2.begin_fill()
p2.left(45)
p2.forward(a*2)
p2.circle(a,180)kikgpo'e
p2.right(90)
p2.circle(a,180)
p2.forward(a*2)
p2.end_fill()
p2.hideturtle()
def run(self):
print("狗狗飞快的跑起来")
class Husky(Dog): # 哈士奇类
def __init__(self):
??
coco = Husky()
print(coco.skin)
\ No newline at end of file
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