In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
#! / usr/bin/python
#-*-coding: UTF-8-*-
Def account_login (account):
If account in Dict.keys ():
Tmp=Dict [account]
Password=input ("enter the password:")
If password in tmp.keys ():
If tmp [password] = = 0:
Return 0
Else:
Return 3
Else:
Print ('Error password:')
Return 1
Else:
Return 2
Def lock_account (account):
For k in Dict:
If k = = account:
For subk in Dict [k]:
Dict [k] [subk] = 1
Def try_times (account):
Num=3
While num > 0:
Result=account_login (account)
If result = = 1:
Num=num-1
If num = = 0:
Lock_account (account)
Print ('The account% s is locked current% account)
Exit ()
Elif result = = 2:
Print ('no account')
Exit ()
Elif result = = 3:
Print ('The account was locked')
Exit ()
Elif result = = 0:
Print ('success login on the% slots% account)
Break
List1 = []
List2 = []
Def check_intnumber (n):
If int (n)% 2 = = 0:
Return True
Else:
Return False
Def append_list (arg_list):
Global list1
Global list2
For i in arg_list:
If check_intnumber (I) = = True:
List1.append (I)
Elif check_intnumber (I) = = False:
List2.append (I)
Def filit_number (arg):
Arg_list = arg.split (',')
For i in arg_list:
If str.isdigit (I) = = False:
Arg_list.remove (I)
Else:
Pass
Return arg_list
Def main ():
Account=input ("enter the accout:")
Try_times (account)
Arg = input ('enter someting to check:')
Arg_list = filit_number (arg)
Append_list (arg_list)
Print ('odd number',list2)
Print ('even number',list1)
If _ _ name__ = ='_ _ main__':
Dict = {'oracle': {' a123: 0}, 'root': {' b123: 0}, 'mysql': {' c123: 1}}
Main ()
# # A novice test requires user verification before performing functions. 0 in the user dictionary means normal and 1 means the user is locked.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.