Commit 6c7c37f6 by BellCodeEditor

save project

parent 864e67a3
Showing with 9 additions and 7 deletions
class hero: class hero:
def __init__(self): def __init__(self,name,level,hp,attack):
self.name=name
self.level= 1 self.level= 1
self.hp= 3936 self.hp= hp
self.attack= 482 self.attack= attack
qiwang = hero() x=hero("x",7989,78)
print("xxxxx:",qiwang.hp) j=hero("x",5239,158)
print("xxxxx:",qiwang.attack) print("xxx:",x,hp)
\ No newline at end of file print("xxx:",x,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