Commit 91fd38da by BellCodeEditor

save project

parent a22bfe92
Showing with 5 additions and 3 deletions
......@@ -4,12 +4,14 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def upgrade():
def upgrade():
Huaqiang.level=Huaqiang.level+1
Huaqiang.hp*=11
Huaqiang.attack*=11
#Zhangsan=Hero('张三',9999999,9999)
#upgrade()
Huaqiang=Hero('华强',9999999,9999)
upgrade()
print('华强的hp为:9999999'+str(Zhangsan.hp))
#print('张三的hp为:9999999'+str(Huaqiang.hp))
print('华强的hp为:9999999'+str(Huaqiang.hp))
#print('张三的hp为:9999999'+str(Zhangsan.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