PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#password challenge
#This program will test to see if your password meets all the following conditions:
#Password must contain atlease 1 each lowercase letter, uppercase letter, number, special charater, and must be atleast 8 charatets long
import string
lcl = list(string.ascii_lowercase)
ucl = list(string.ascii_uppercase)
numb = list(range(100))
sc = list(string.punctuation)
numb = str(numb)
# these strings will be used for output if password does not meet all conditions.
pw = input()
spw = str(pw)
a = "Password must contain"
b = a + " lowercase letter"
c = a + " uppercase letter"
d = a + " special charater"
e = a + " a number"
f = a + " min 8 charaters"
#these lists will be used to test for password conditions
contains_lc = []
contains_uc = []
contains_nm = []
contains_sc = []
for i in spw:
if i in lcl:
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run