Commit 61a55033 by BellCodeEditor

save project

parent f20ff4bc
Showing with 8 additions and 7 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
print(yase.attack) yase.attack = yase.attack + 5
print(houyi.attack) yase = Hero("yase",200,25)
print(k.attack) updeta()
\ No newline at end of file print(yase.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