Commit f822d765 by BellCodeEditor

save project

parent f261cfd2
Showing with 6 additions and 3 deletions
class hero: class hero:
def_init_(self) def_init_(self,name,hp,attack):
self.leve1 = 1 self.leve1 = 1
self.hp= 300 self.name = name
self.attack= 20 self.hp= hp
self.attack= attack
yase = hero("亚克",300,20)
houyi = hero("后裔",240,23)
yase = hero() yase = hero()
print("yase的血量值为:",yase.hp) print("yase的血量值为:",yase.hp)
......
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