Commit d2796d61 by BellCodeEditor

save project

parent 69cc40d3
Showing with 7 additions and 7 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,age,sex):
self.level=1 self.name=name
self.hp=300 self.age=age
self.attack=20 self.sex=sex
yase=Hero() yase=Hero('张三','19','男')
print(yase.attack) print(yase.name)
\ No newline at end of file \ 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