Commit d0161d17 by BellCodeEditor

save project

parent d6c81a0f
Showing with 17 additions and 0 deletions
class Person:
def __init__(self,name,HP,MP,A):
self.level=1
self.HP=HP
self.MP=MP
self.A =A
HouYi=Person("HouYi",2500,150,150)
print(HouYi.HP)
def up():
HouYi.level=HouYi.level+1
HouYi.HP=HouYi.HP+200
HouYi.MP=HouYi.MP+50
HouYi.A=HouYi.A+100
up()
print(HouYi.HP+200)
print(HouYi.A+100)
\ 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