Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x=1
- while x<=5:
- input_choose = raw_input('''
- [1]Create a new account
- [2]log in
- ''')
- if input_choose == '1':
- input_first = raw_input('Enter your first name :\n')
- input_second = raw_input('Enter your second name :\n ')
- input_email = raw_input('Enter your Email Address :\n')
- input_password = raw_input('Enter your password :\n')
- with open('emails.txt', 'a') as email:
- email.write(input_email + '\n')
- email.close()
- with open('passwords.txt', 'a') as password:
- password.write(input_password + '\n')
- password.close()
- print 'Welcome ' + input_first + ' ' + input_second
- elif input_choose == '2':
- input_email = raw_input('Enter Ur Email Address :\n')
- input_password = input('Enter your password :\n')
- read_emails = open('emails.txt', 'r')
- read_emails.read()
- read_password = open('passwords.txt', 'r')
- read_password.read()
- read_password.close()
- if (input_email in read_emails) and (input_password in read_password) :
- print ('Welcome sir' )
- else:
- if input_email in read_emails:
- print('your password is wrong')
- elif input_password in read_password:
- print ('your account is wrong')
- else:
- print('your accound and password is wrong')
- read_emails.close()
- read_password.close()
- x+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement