Commit f6c43c30 by BellCodeEditor

save project

parent 6e7d5abf
Showing with 16 additions and 3 deletions
......@@ -4,8 +4,21 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def qwe():
yese.level=yese.level+1
yese.hp=yese.hp+50
yese.attack=yese.attack+10
yese=Hero('亚瑟',100,10)
qwe()
qwe()
qwe()
qwe()
qwe()
print('他的名字:',yese.name)
print('亚瑟的等级:',yese.level)
print('亚瑟的血量:',yese.hp)
print('亚瑟的攻击力:',yese.attack)
print('他的名字:',yese.name)
\ No newline at end of file
print('亚瑟的攻击力:',yese.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