Commit 168f9fdc by BellCodeEditor

save project

parent a9a1d38e
Showing with 23 additions and 5 deletions
# import turtle
# pen=turtle.Pen()
# pen.write("亲爱的同学们:\n今天学习了python中数据类型,\n回家后记得及时复习巩固,\n下周末再见!\n ———pipi",font=("Times",20,"normal"))
# pen.hideturtle()
# turtle.done()
# 画图
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.forward(100)
turtle.done()
\ No newline at end of file
...@@ -4,7 +4,7 @@ class hero: ...@@ -4,7 +4,7 @@ class hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
kai=Hero("凯"90006000) kai=hero("凯",9000,6000)
yingzeng=Hero("嬴政"5000600) yingzeng=hero("嬴政",5000,600)
print(name,hp,attack) print(kai.name)
print(name,hp,attack) print(yingzeng.name)
\ No newline at end of file \ 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