Commit 61a55033 by BellCodeEditor

save project

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