Commit 9164a230 by BellCodeEditor

save project

parent 6fe93611
Showing with 11 additions and 1 deletions
class Hero:
def __init__(self,Name,hp,attack):
self.level =1
self.name =name
self.hp=hp
self.attack=attack
Tom=Hero('汤姆'30002000)
jieruia=Hero('杰瑞'5000,3000)
print('汤姆血量:'Tom.hp)
print('杰瑞血量:'Tom.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