Advertisement
Guest User

Untitled

a guest
Sep 15th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 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 input_pass == maindict[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[username]= password
  20. print('username and password saved. ')
  21. user_count=user_count+1
  22.  
  23. else:
  24. print('Invalid Option')
  25.  
  26. again=input('Do You Want to Add Account? if Yes pres "Y"')
  27. if again == 'Y' or 'y':
  28. repeat=True
  29. elif again == 'N':
  30. break
  31. else:
  32. print('Invalid Option')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement