+ 1
Don't know what is error in this for loop. Can anyone suggest. As it is working fine in juypter
3 Antworten
+ 5
Here is a slightly reworked code that should do the job:
https://code.sololearn.com/cdxAdWR3O97Y/?ref=app
+ 4
Post your code seperately ,linking from here won't help us seeing your code ,it will take us to our solution only ,
+ 1
l, u, p, d = 0, 0, 0, 0
s = input()
if (len(s) >= 14):
for i in s:
# counting lowercase alphabets
if (i.islower()):
l+=1
# counting uppercase alphabets
if (i.isupper()):
u+=1
# counting digits
if (i.isdigit()):
d+=1
# counting the mentioned special characters
if(i=='@'or i=='!' or i=='#', or i=='#x27;, or i=='%', or i=='&',or i== '*'):
p+=1
if (l>=1 and u>=1 and p>=2 and d>=2 and l+p+u+d==len(s)):
print("Strong")
else:
print("Weak")