# list1 = [8,4,2,1,23,344,12] # sum = 0 # for x in list1: # print('数字的值:', x) # sum += x # print('和:%d'%sum) # num = int(input('请输入你要查找的数字:')) # if list1.count(num)==0: # print('数字不存在!') # else: # print('存在') # arrScore =[] # i = 1 # while i<= 3: # s = float(input('请录入第%d个人的成绩:'%i)) # i += 1 # arrScore.append(s) # # 排序 # arrScore.sort() # print(arrScore) # users=[['tom1','123'],['tom2','123'],['tom3','123']] # flag = False #标记变量 # name = input('请输入用户名') # pwd = input('请输入用密码') # for u in users: # if name==u[0] and pwd==u[1]: # flag= True # break # if flag: # print('登录成功') # else: # print('用户名或密码错误') # def panduan(num_4): # if num_4%400 ==0 or num_4%4==0 and num_4%100!=0: # return "为闰年" # else: # return "不是闰年" # # if __name__ == '__main__': # nianfen = int(input("请输入年份:")) # print(panduan(nianfen)) # a = '-' # print(a*40) # print('欢迎使用用户管理系统') # print('1.注册新用户') # print('2.登陆') # print(a*40) # name = '' # pwd = '' # flag = 'y' # while flag == 'y': # num = int(input('请选择菜单:')) # if num== 1: # name = input('请输入用户名:') # if name =='admin': # print('用户名已经被占用!请重新操作 ') # continue # pwd = input('请输入密码 :') # if len(pwd)< 6: # print('密码不能小于六位') # print('') # elif num== 2: # print('***********登陆系统**********') # name1 = input('请输入用户名:') # pwd1 = input('请输入密码:') # if name ==name1 and pwd == pwd1: # print('登录成功!!!') # break # else: # print('输入有误 !') # continue # flag = input('是否继续(y/n)') # print('谢谢使用!')