Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- os.system("clear")
- print ("Password Checker")
- print ("")
- #Create a string of passwords and print it
- text = "miso2 3ant kawii! 8runner n3mui 5sushi"
- print (text)
- print("")
- #Split the string at the space
- #Since it is a list of passwords, call the list passwords
- #Print how many passwords there are
- #Iterate through the list
- #Print each word on a separate line
- #Iterate through the list
- #Print the first letter of each password on a separate line
- #Create a function called isNumber to determine if a character is a number
- #Return True if it is a number
- #Otherwise, Return false
- #Iterate through the list.
- #Print the passwords that start with numbers only
- #Use the isNumber function you just created
- #Iterate through the list.
- #A valid password starts with a number and is longer than 5 characters
- #Print whether each password is valid, or invalid
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement