Commit d2d9a0ed by BellCodeEditor

save project

parent d251ad49
Showing with 17 additions and 4 deletions
class Hero:
def __init__(self):
self.level = 1
self.hp = 300
self.attack = 20
yase=Hero()
print(yase.hp)
\ No newline at end of file
......@@ -3,9 +3,14 @@ student2={'语文':9,'数学':68,'英语':8}
student3={'语文':1,'数学':8,'英语':5}
score={'悟空':student1,'诺依':student2,'小贝':student3,}
while True:
print('*'*50)
a=input("名字:")
print('*'*70)
a=input("名字:(如果要退出请按q)")
if a in score:
b=score[a]
for k,v in b.items():
print(k,v)
\ No newline at end of file
print(k,v)
elif a=='q':
print("谢谢你的光临!")
break
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