Advertisement
Guest User

Untitled

a guest
Sep 15th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. repeat = True
  2.  
  3. maindict ={}
  4. while(repeat):
  5. user_count=1
  6. choice=int(input('Slect Option: \n1. Login \n2. Register \nChoice:'))
  7. if choice == 1:
  8. input_user=input('Enter Username: ')
  9. input_pass=input('Enter Password: ')
  10.  
  11. if maindict[user_count]==input_pass and input_user:
  12. print('Success!')
  13. else:
  14. print ('Invalid Username or Password.')
  15.  
  16. elif choice ==2:
  17. username=input('Input Your Username: ')
  18. password=input ('Input your Password: ')
  19. maindict[user_count]=[password]
  20. print('username and password saved. ')
  21. user_count=user_count+1
  22.  
  23.  
  24. else:
  25. print('Invalid Option')
  26.  
  27. again=input('Login and Add Account? Y or N: ')
  28. if again == 'Y' or 'y':
  29. repeat=True
  30. elif again == 'N':
  31. break
  32. else:
  33. print('Invalid Option')
  34. print('Program will be Terminated')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement