Commit 5a8a1bbd by BellCodeEditor

save project

parent b1caa249
Showing with 16 additions and 14 deletions
student1 = {'语文': 91, '数学': 88, '英语': 85} import random
student2 = {'语文': 97, '数学': 98, '英语': 90} a=random.random(1,100)
student3 = {'语文': 95, '数学': 100, '英语': 93} b=1
score = {'悟空': student1, '诺依': student2, '小贝': student3} while True :
name = input("名字:") c=int(input('要猜的数')
print("*"*30) if c<a:
if name in score: print('小了')
info = score[name] b=b+1
for k, v in info.items(): elif c>a:
print(k, v) print('大了')
print("*"*30) b=b+1
else: else:
print("没有这个人") break
\ No newline at end of file print('恭喜,用了%b次',%(c))
\ 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