# coding:UTF-8# 制作简单的人员数据库,包括电话和工号
def look_name(): people = {
"李大嘴":{"手机号":13165782231,"工号":29888},
"小跑堂":{"手机号":13162938888,"工号":29999},
"佟湘玉":{"手机号":13160958846,"工号":29000}
}
# 要问手机号还是工号?这是一个问题 labels = {"1":"手机号","2":"工号"}
name = input("请问您找谁?\n")
if name in people:
ques = int(input("请问您找什么?手机(1)工号(2)\n"))
if ques ==1:key ="手机号"
if ques ==2:key = "工号"
print("这是您要找信息:\n{}的{}是{}".format(name,key,people[name][key]))
else:print("还没有{}的信息,抱歉!".format(name))
print()
exco = input("按Q退出")
print("哈哈完蛋,好像说beak只能用在循环中,所有现在停不下来了,尴尬......那么")
look_name()
look_name()
def look_name(): people = {
"李大嘴":{"手机号":13165782231,"工号":29888},
"小跑堂":{"手机号":13162938888,"工号":29999},
"佟湘玉":{"手机号":13160958846,"工号":29000}
}
# 要问手机号还是工号?这是一个问题 labels = {"1":"手机号","2":"工号"}
name = input("请问您找谁?\n")
if name in people:
ques = int(input("请问您找什么?手机(1)工号(2)\n"))
if ques ==1:key ="手机号"
if ques ==2:key = "工号"
print("这是您要找信息:\n{}的{}是{}".format(name,key,people[name][key]))
else:print("还没有{}的信息,抱歉!".format(name))
print()
exco = input("按Q退出")
print("哈哈完蛋,好像说beak只能用在循环中,所有现在停不下来了,尴尬......那么")
look_name()
look_name()