print('---------------------') print('security check') print('---------------------') print('') user = input('Who is this?') if user == 'King Arthur': realpassword = 'Arthur is a donkey' chock = 0 while chock == 0: password = input('Enter password: ') if password == realpassword: chock = 1 print('Welcome, King Arthur!') else: chock = 0 print('Sorry, but your password is incorrect') else: print('Sorry, but your username is not recognised')