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
#answer for code coach password validation, a strong password will have 7 characters, 2 symbols(check code) and two numbers
#there are three checks(length, symbolCount, numCount), a strong password must pass all three
#keep track of passed and failed checks in 1 and 0s
checks=[]
#input
password = input()
#check length
if len(password) <= 7:
checks.append(0)
else:
checks.append(1)
#number check
numcheck = 0
for i in password:
if i.isdigit():
numcheck = numcheck+1
Enter to Rename, Shift+Enter to Preview
OUTPUT
Запуск