Commit 70a8a77b by BellCodeEditor

auto save

parent 22354288
Showing with 18 additions and 0 deletions
class Fishermen:
def __init__(self,name,level,hp,atk):
self.level = 1
self.name = name
self.hp = hp
self.atk = atk
travelY=Fishermen('Ying',1,916,68)
travelK=Fishermen('Kong',1,968,64)
def levelup():
travelY.level+=1
travelY.hp+=57
travelY.atk+=12
levelup()
print(travelY.name,travelY.level,travelY.hp,travelY.atk)
\ 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