在 以下是我编的程序,要说的话都在图片里,请指教! 中回复
此程序的终极版本
代码:
#通过字典完成的一个简单程序/A simple program done with a dictionary #非喵人士可以通过列表完成这个程序/Non-badass people can complete this program with a list
D = 0 name_age_ID_number = {'王明': '34岁', '李大忠': '43岁', '马喵': '11岁', '王明ID': '身份证号码:123946148295629374', '李大忠ID': '身份证号码1473喵91喵63817263'\ ,'马喵ID':'身份证号码237428462937462184'}# 身份证号码是伪的,别想那么多/Id Card number is false, don't think so much print('初始人名:王明、李大忠、马喵') while 1: # 重复执行/Repeat execution if(D == 0):#中文版 a = str(input('请输入服务:')) if(a == '添加人名'): name2 = str(input('请输入人名:')) age2 = str(input('请输入年龄:')) name_age_ID_number[name2] = age2 ID_number2 = str(input('请输入身份证号码:')) name_age_ID_number[name2 + 'ID'] = '身份证号码:' print('添加完成') if(a == '查询身份'): c = str(input('请输入人名:')) name_l = list(name_age_ID_number.keys()) if c in name_l: print('{},{},{}'.format\ (c, name_age_ID_number[c], name_age_ID_number[c+'ID'])) if(a == '语言设置'): C = str(input('请输入语言:')) if(C == 'English'): print('\033c', end='') name_age_ID_number = {'Wing ming': '34years old', 'Li dazhong': '43years old', 'Maniubi': '11years old', 'WID': 'ID number:123946148295629374', 'LID': 'ID number:1473喵91喵63817263'\ ,'MID':'ID number:237428462937462184'} print('IInitial name:Wang ming,Li dazhong,Maniubi') D = 1 else: a = str(input('Please enter the service:')) if(a == 'Add a person name'): name2 = str(input('Please enter a name:')) age2 = str(input('Please enter age:')) name_age_ID_number[name2] = age2 ID_number2 = str(input('Please enter your identity card number:')) name_age_ID_number[name2 + 'ID'] = 'ID number:' print('Add done') if(a == 'Check identity'): c = str(input('Please enter a name:')) name_l = list(name_age_ID_number.keys()) if c in name_l: print('{},{},{}'.format\ (c, name_age_ID_number[c], name_age_ID_number[c+'ID'])) if(a == 'Language setting'): C = str(input('Please enter the language:')) if(C == '中文简体'): print('\033c', end='') name_age_ID_number = {'王明': '34岁', '李大忠': '43岁', '马喵': '11岁', '王明ID': '身份证号码:123946148295629374', '李大忠ID': '身份证号码1473喵91喵63817263'\ ,'马喵ID':'身份证号码237428462937462184'} print('初初始人名:王明、李大忠、马喵') D = 0 感谢:田所·布兰度、中子星000
2022-07-28T14:47:21 点赞:0
在 作品之打印(print) 中回复
????????????????????????????????
2022-07-29T21:50:57 点赞:0
在 小白求助!! 中回复
第7行 x 未定义
2022-08-01T21:35:57 点赞:0