У нас вы можете посмотреть бесплатно How to make a simple login system in python (part 2) или скачать в максимальном доступном качестве, которое было загружено на ютуб. Для скачивания выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса savevideohd.ru
Today you will learn how to make a system which will shut down the program when the user enter the wrong password 15 times. On line 23 lockedOut = LockedOut + 1 Make the second lockedOut start with a lower case letter. Code: accounts = {"Test" : "Test1", "Test2" : "Password"} loading = True fails = 0 failsLeft = 5 timeWait = 10 lockedOut = 0 while loading: username = input("Please enter your username: ") password = input("Please enter the password for " + username + ": ") if (accounts.get(username) == password): print("Login Succesful") test = input(".") #This is just so the program doesn't shut down as soon as you get the username and password correct else: print("Login Failed") fails = fails + 1 failsLeft = failsLeft - 1 print("You have " + str(failsLeft) + " until being lock out for " + str(timeWait)) if failsLeft == 0: print("Sorry you have been locked out for " + str(timeWait) + " seconds.") lockedOut = lockedOut + 1 failsLeft = failsLeft + 5 if lockedOut == 3: print("Sorry you have been permantly locked out.") loading = False