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
#declare valid_password input variable
valid_password= input();
#declare special charecters variable
special_charecters= ['!', '@', '#', '$', '%', '&', '*']
#declare count variable to count special_charecters
count_special= 0;
#delclare count numbers variable
count_numbers= 0;
#check valid_password length is 11 or more
if len(valid_password) > 6:
#loop over the input
for char in valid_password:
#check if a every char is string is a special_charecter and increase count if true
if char in special_charecters:
count_special+= 1;
#else check if it is a number and increse the count if true
elif char.isdigit():
count_numbers+= 1;
# end of looping now check the variables and print the expected output
if count_special > 1 and count_numbers > 1:
print('Strong')
else:
print('Weak')
else:
Enter to Rename, Shift+Enter to Preview
OUTPUT
Запуск