Commit edc23c5a by BellCodeEditor

save project

parent 721f137c
Showing with 17 additions and 8 deletions
......@@ -4,11 +4,14 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def updata(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
yase=Hero('yase',300,20)
yase.updata()
yase.updata()
yase=Hero('yase',200,30)
def updata():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=40
\ No newline at end of file
print(yase.level)
print(yase.hp)
print(yase.attack)
\ No newline at end of file
class Student:
def__
self.nj=nj
self.bj=bj
self.pd=pd
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