Created
February 12, 2019 14:25
-
-
Save evwltrs/e41ee76e89667e91901c24cef9bc5a05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import only system from os | |
from os import system, name | |
# import sleep to show output for some time period | |
from time import sleep | |
# define our clear function | |
def clear(): | |
# for windows | |
if name == 'nt': | |
_ = system('cls') | |
# for mac and linux(here, os.name is 'posix') | |
else: | |
_ = system('clear') | |
passwordset = input('What password do you want to set? ') | |
print(f'Set password to {passwordset}') | |
sleep(2) | |
clear() | |
password = input('Enter your password: ') | |
if (password == passwordset): | |
print('Access Granted') | |
else: | |
print('Try again') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment