Commit 61a55033 by BellCodeEditor

save project

parent f20ff4bc
Showing with 7 additions and 6 deletions
...@@ -4,9 +4,10 @@ class Hero: ...@@ -4,9 +4,10 @@ class Hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase = Hero("yase",300,30) def updeta():
houyi = Hero("houhyi",240,32) yase.level = yase.level + 1
k = Hero("k",260,31) yase.hp = yase.hp + 100
yase.attack = yase.attack + 5
yase = Hero("yase",200,25)
updeta()
print(yase.attack) print(yase.attack)
\ No newline at end of file
print(houyi.attack)
print(k.attack)
\ 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