Commit 511b571e by BellCodeEditor

save project

parent d93aae68
Showing with 2 additions and 2 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,attack):
self.level=1 self.level=1
self.name=name self.name=name
self.hp=hp self.hp=hp
...@@ -7,4 +7,4 @@ class Hero: ...@@ -7,4 +7,4 @@ class Hero:
yase=Hero("鸭塞",300,20) yase=Hero("鸭塞",300,20)
hoye=Hero("侯爷",240,23) hoye=Hero("侯爷",240,23)
print("鸭塞",yase.hp) print("鸭塞",yase.hp)
print("侯爷",yase.attack) print("侯爷",hoye.hp)
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