Commit 2be190b7 by BellCodeEditor

save project

parent 37bd75df
Showing with 10 additions and 7 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,attack):
self.level=100000000000 self.level=1
self.hp=800000 self.name=name
self.attack=56000 self.hp=hp
ffyhf=Hero() self.attack=attack
print(ffyhf.hp) libai=Hero('李白',500,35)
\ No newline at end of file mengtian=Hero('蒙恬',300,20)
print("李白的血量是",libai.hp)
print("蒙恬的血量是",mengtian.hp)
\ 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