Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. username = input("please enter user name: ")
  2. password = input("please enter password: ")
  3.  
  4. def wholestring(stuff):
  5.     str.isalnum(stuff)
  6.  
  7. def validate(username, password):
  8.     if username == password:
  9.         return False
  10.     passlength = len(password)
  11.     if passlength < 8:
  12.         return False
  13.     wholestring(password)
  14.     wholestring(username)
  15.  
  16. def main():
  17.     if validate(username,password) == True:
  18.         print("Password is valid")
  19.     else:
  20.         print("Password is invalid")
  21.        
  22. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement