SCSIraidGURU’s World

My first python application.


 python3 --version
Python 3.6.9


# !/usr/bin/python

# This program will verify your password is the following criteria
# 2 or more lowercase consonants
# 2 or more lowercase vowels
# 2 or more upper case consonants
# 2 or more upper case vowels
# 2 or more numbers
# minimum of 12 characters
from typing import List

def main():
# creates arrays of lowercase consonants and uppercase consonants
lower_con = [‘b’, ‘c’, ‘d’, ‘f’, ‘g’, ‘h’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’, ‘p’, ‘q’, ‘r’, ‘s’, ‘t’, ‘v’, ‘w’, ‘x’, ‘y’,
‘z’];
lower_con
upper_con = [element.upper() for element in lower_con];
upper_con

# creates arrays of lowercase vowels and uppercase vowels
lower_vowel = [‘a’, ‘e’, ‘i’, ‘o’, ‘u’];
lower_vowel
upper_vowel = [element.upper() for element in lower_vowel];
upper_vowel

# array of integers
numbers = [‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’]

# array of special characters
special_char = [‘`’, ‘~’, ‘!’, ‘#’, ‘


Output



/home/michael/PycharmProjects/firstproj/venv/bin/python /home/michael/PycharmProjects/firstproj/arrays.py
['B', 'C', 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'X', 'Y', 'Z']
['a', 'e', 'i', 'o', 'u']
['A', 'E', 'I', 'O', 'U']
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
['`', '~', '!', '#', '$', '%', '^', '&', '*', '(', ')', '-', '=', '+', ':', ';', '?', '@', '<', '>', '_', '/', '|']
['ShortTest77', 'CorrectSize12', 'ThreeeRepeating', 'UPPERCASETESt12', 'UppercaseTest12', 'UppErcaseTest12', 'UppErcaseTest12', 'UppErcASeTests2', 'UpPercAsETest34', 'Up%PercAsETest34', 'Up%PercAsE#Test34']
   
now comes the fun stuff
 
ShortTest77   FAILED: Password is too short
 
CorrectSize12   PASSED: password is 12 characters or longer
CorrectSize12   PASSED: Does not have 3 repeating character
CorrectSize12   PASSED: It has at least 2 lower case consonants
CorrectSize12   PASSED: It has at least 2 upper case consonants
CorrectSize12   FAILED: It has less than 2 uppercase vowels
 
ThreeeRepeating   PASSED: password is 12 characters or longer
ThreeeRepeating   FAILED: has 3 repeating characters
 
UPPERCASETESt12   PASSED: password is 12 characters or longer
UPPERCASETESt12   PASSED: Does not have 3 repeating character
UPPERCASETESt12   FAILED: It has less than 2 lower case consonants
 
UppercaseTest12   PASSED: password is 12 characters or longer
UppercaseTest12   PASSED: Does not have 3 repeating character
UppercaseTest12   PASSED: It has at least 2 lower case consonants
UppercaseTest12   FAILED: It has less than 2 upper case consonants
 
UppErcaseTest12   PASSED: password is 12 characters or longer
UppErcaseTest12   PASSED: Does not have 3 repeating character
UppErcaseTest12   PASSED: It has at least 2 lower case consonants
UppErcaseTest12   FAILED: It has less than 2 upper case consonants
 
UppErcaseTest12   PASSED: password is 12 characters or longer
UppErcaseTest12   PASSED: Does not have 3 repeating character
UppErcaseTest12   PASSED: It has at least 2 lower case consonants
UppErcaseTest12   FAILED: It has less than 2 upper case consonants
 
UppErcASeTests2   PASSED: password is 12 characters or longer
UppErcASeTests2   PASSED: Does not have 3 repeating character
UppErcASeTests2   PASSED: It has at least 2 lower case consonants
UppErcASeTests2   PASSED: It has at least 2 upper case consonants
UppErcASeTests2   PASSED: It has at least 2 uppercase vowels
UppErcASeTests2   PASSED: It has at least 2 lowercase vowels
UppErcASeTests2   FAILED: It has less than 2 numbers
 
UpPercAsETest34   PASSED: password is 12 characters or longer
UpPercAsETest34   PASSED: Does not have 3 repeating character
UpPercAsETest34   PASSED: It has at least 2 lower case consonants
UpPercAsETest34   PASSED: It has at least 2 upper case consonants
UpPercAsETest34   PASSED: It has at least 2 uppercase vowels
UpPercAsETest34   PASSED: It has at least 2 lowercase vowels
UpPercAsETest34   PASSED: It has at least than 2 numbers
UpPercAsETest34   FAILED: It has less thn 2 special characters
 
Up%PercAsETest34   PASSED: password is 12 characters or longer
Up%PercAsETest34   PASSED: Does not have 3 repeating character
Up%PercAsETest34   PASSED: It has at least 2 lower case consonants
Up%PercAsETest34   PASSED: It has at least 2 upper case consonants
Up%PercAsETest34   PASSED: It has at least 2 uppercase vowels
Up%PercAsETest34   PASSED: It has at least 2 lowercase vowels
Up%PercAsETest34   PASSED: It has at least than 2 numbers
Up%PercAsETest34   FAILED: It has less thn 2 special characters
 
Up%PercAsE#Test34   PASSED: password is 12 characters or longer
Up%PercAsE#Test34   PASSED: Does not have 3 repeating character
Up%PercAsE#Test34   PASSED: It has at least 2 lower case consonants
Up%PercAsE#Test34   PASSED: It has at least 2 upper case consonants
Up%PercAsE#Test34   PASSED: It has at least 2 uppercase vowels
Up%PercAsE#Test34   PASSED: It has at least 2 lowercase vowels
Up%PercAsE#Test34   PASSED: It has at least than 2 numbers
Up%PercAsE#Test34   PASSED: It has at least than 2 special characters

Process finished with exit code 0

Close Menu