Commit 6e020493 by BellCodeEditor

save project

parent 183a6f73
Showing with 10 additions and 20 deletions
student1 = {'语文': 91, '数学': 88, '英语': 85}
student2 = {'语文': 97, '数学': 98, '英语': 90}
student3 = {'语文': 95, '数学': 100, '英语': 95}
student4 = {'语文': 100, '数学': 100, '英语': 100}
score = {'悟空': student1, '诺依': student2, '小贝': student3,'胡晋玮': student4}
sbyh1 = {'diy':3,'piy':9,'ciy':4}
sbyh2 = {'diy':1,'piy':4,'ciy':2}
sbyh3 = {'diy':9,'piy':5,'ciy':5}
class(Hero):
def _init_(self,name):
self.level = 1
self.hp = 3500
self.attack = 388
self.name = name
# 查询并打印出输入的名字对应的所有科目的成绩
while True :
name = input("名字:")
if name in score :
a = score[name]
print('*'*30)
for k,v in a.items():
print(k,v)
break
else:
print('输入错误')
\ No newline at end of file
def combat(self,ennemy):
ennemy.hp -= self.attack
info1 =
\ 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