Commit 759c328e by BellCodeEditor

save project

parent a18e4a4c
Showing with 8 additions and 8 deletions
class hero:
def __init__(self):
def __init__(self,name,hp,attack):
self.level=1
self.hp=300
self.attack=20
fwukong=Hero()
print(fwukong.hp)
print(fwukong.leve1)
print(fwukong.attack)
\ No newline at end of file
self.hp=hp
self.attack=attack
self.name=name
houyi=hero('houyi',300,20)
kai=hero('kai',30,20000000000000000000000000000000000000000000)
print(kai.hp)
print(houyi.attack)
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