Commit 03f7c5f0 by BellCodeEditor

save project

parent 71f22aa0
Showing with 6 additions and 2 deletions
......@@ -2,4 +2,9 @@ class Hero:
def __init__(self):
self.hp=300
self.level=1
self.attack=20
\ No newline at end of file
self.attack=20
jinan=Hero()
print("jinan的血量值为:",jinan.hp)
print("jinan的攻击力为:",jinan.attack)
print("jinan的等级为:",jinan.level)
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