Commit aa32dbfc by BellCodeEditor

auto save

parent e6e841dc
Showing with 13 additions and 8 deletions
class shot:
def __init__(slef,name,age,level,skill):
def __init__(self,name,level,hp,attack):
self.name=name
self.age=age
self.level=level
self.skill=skill
hz=shot('黄忠',50,20,'鸡你太美')
ssx=shot('孙尚香',20,10,'唱跳Rap')
print(hz.skill)
print(ssx.age)
\ No newline at end of file
self.hp=hp
self.attack=attack
hz=shot('黄忠',50,20,90)
ssx=shot('孙尚香',20,10,50)
def improve():
ssx.level=ssx.level+1
ssx.hp=ssx.hp+50
ssx.attack=ssx.attack+20
improve()
improve()
print(ssx.attack)
\ 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