Advertisement
Guest User

علوقيه LOGIN

a guest
Jun 18th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.49 KB | None | 0 0
  1. x=1
  2. while x<=5:
  3.     input_choose = raw_input('''
  4.    [1]Create a new account
  5.    [2]log in
  6.    ''')
  7.     if input_choose == '1':
  8.         input_first = raw_input('Enter your first name :\n')
  9.         input_second = raw_input('Enter your second name :\n ')
  10.         input_email = raw_input('Enter your Email Address :\n')
  11.         input_password = raw_input('Enter your password :\n')
  12.         with open('emails.txt', 'a') as email:
  13.             email.write(input_email + '\n')
  14.             email.close()
  15.         with open('passwords.txt', 'a') as password:
  16.             password.write(input_password + '\n')
  17.             password.close()
  18.         print 'Welcome ' + input_first + ' ' + input_second
  19.  
  20.     elif input_choose == '2':
  21.         input_email = raw_input('Enter Ur Email Address :\n')
  22.         input_password = input('Enter your password :\n')
  23.  
  24.         read_emails =  open('emails.txt', 'r')
  25.         read_emails.read()
  26.  
  27.         read_password = open('passwords.txt', 'r')
  28.         read_password.read()
  29.         read_password.close()
  30.  
  31.         if (input_email in read_emails) and (input_password in read_password) :
  32.  
  33.             print ('Welcome sir' )
  34.         else:
  35.             if input_email in read_emails:
  36.                 print('your password is wrong')
  37.             elif input_password in read_password:
  38.                 print ('your account is wrong')
  39.             else:
  40.                 print('your accound and password is wrong')
  41.         read_emails.close()
  42.         read_password.close()
  43.     x+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement