Commit aeb2312e by BellCodeEditor

save project

parent 1a47c24f
Showing with 23 additions and 0 deletions
class Hero:
def __init__(relf):
self.level = 1
self.hp = 300
self.attack = 20
yase = Hero()
print("yase的血量为:",yase.hp)
print("yase的攻击力为:",yase.attack)
\ No newline at end of file
import turtle
pen = turtle.Pen()
pen.fillcolor("red")
pen.begin_fill()
for i in range(36):
pen.forward(200) # 移动200
pen.left(170) # 改变方向
pen.end_fill()
pen.hideturtle()
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