Commit b147fad6 by BellCodeEditor

save project

parent d493d152
Showing with 31 additions and 11 deletions
class Hero:
def __init__(self,name,hp,attack):
class jj:
def __init__(self,name,foot,skin):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
k=Hero('K',5600,199)
print(yase.attack)
print(hy.attack)
print(k.attack)
\ No newline at end of file
self.foot=foot
self.skin=skin
yuh=jj(2,4,"black")
print(yuh.name)
\ No newline at end of file
class Hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
gy=Hero('gy',300,20)
lb=Hero('lb',250,230)
wk=Hero('wk',5600,199)
print(gy.attack)
print(ld.attack)
print(wk.attack)
\ No newline at end of file
i1={"数学":99,"语文":67,"英语":100}
i2={"数学":89,"语文":89,"英语":92}
i3={"数学":100,"语文":97,"英语":98}
h={"小明":i1,"小红":i2,"秀秀":i3}
name=input("你的名字")
if name in h:
print("你的成绩是"+str(h[name]))
else:
print("名字不在")
\ 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