SHARE
TWEET

Untitled

a guest Jun 18th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def Menu():
  2.     print('*****WELCOME TO OUR WEBSITE**** \n')
  3.     print('1. Check Password')
  4.     print('2.Generate Passwod ')
  5.     print('3. quit')
  6.     option = int(input('Enter the number of the function 1,2 or 3: '))
  7.     if option == 1:
  8.         CheckPassword()    
  9.     elif option == 2:
  10.         GeneratePassword()
  11.     elif option == 3:
  12.         End()
  13.  
  14. def CheckPassword():
  15.     password1 = input('please enter your password')
  16.     attempts = 0
  17.     while attempts != 3:
  18.         password2= input('please enter your password again: \n')
  19.         attempts = attempts + 1
  20.         if password1 == password2:
  21.             print('access granted')
  22.             attempts = 3
  23.         else:
  24.             print('password incorrect')
  25.             print('you have used', attempts,'attemptsMenu')
  26.  
  27. def End():
  28.     print('\n ****Thanks for using our service****')
  29.    
  30.  
  31. Menu()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top