Commit 6a1a4519 by BellCodeEditor

save project

parent a53c4c1a
Showing with 8 additions and 0 deletions
class Hero:#创建一个英雄类
def __init__(self):
self.level=1#设置等级
self.hp=300#设置血量
self.attack=20#设置攻击力
yase=Hero()
print(yase.hp)
\ 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