Commit 19ebc1a0 by BellCodeEditor

save project

parent c9cc379d
Showing with 8 additions and 8 deletions
class Teacher:
def __init__(self):
self.level=100
self.hp=300
self.attack=200
self.criticalstrike=100
a=Teacher()
print(a.level)
\ No newline at end of file
def __init__(self,name,hp,attack):
self.level=1000
self.name=name
self.hp=hp
self.attack=attack
xiaoni=Teacher("小倪",1000,30)
print("小倪的血量:",xiaoni.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