Advertisement
IsenfireLDC

AutomateTheBoringStuff--Chapter0: Edits 1

May 3rd, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.05 KB | None | 0 0
  1. import math
  2. import random
  3. oddPasswords = ['12345', 'I have a secret password!', '1hi5 15 4 53CR31 P455W0RD', 'HAHAHA']
  4. passwordFile = open('C:\My Stuff\SecretPasswordFile.txt')
  5. secretPassword = passwordFile.read()
  6. print('Enter your password.')
  7. typedPassword = input()
  8. if typedPassword == secretPassword:
  9.     print('Access granted')
  10.     for w in oddPasswords:
  11.         if w == typedPassword:
  12.             print('BTW:')
  13.             break
  14.     if typedPassword == '12345':
  15.         print('That password is one that an idiot puts on their luggage.')
  16.     if typedPassword == 'I have a secret password!':
  17.         print('Yes you do!')
  18.     if typedPassword == '1hi5 15 4 53CR31 P455W0RD':
  19.         print('Don\'t use machine generated passwords.')
  20.     if typedPassword == 'HAHAHA':
  21.         print('Passwords are know laughing matter')
  22. else:
  23.     if typedPassword == '12345':
  24.         print('How simple do you think my password is?!')
  25.     if typedPassword == 'HAHAHA':
  26.         print('You won\'t be laughing long.')
  27.     print('Access Denied')
  28.     print('Hacker!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement