Don't know what is error in this for loop. Can anyone suggest. As it is working fine in juypter | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Don't know what is error in this for loop. Can anyone suggest. As it is working fine in juypter

https://www.sololearn.com/coach/76?ref=app

26th Apr 2020, 10:54 AM
Ritika Rani
Ritika Rani - avatar
3 Answers
+ 5
Here is a slightly reworked code that should do the job: https://code.sololearn.com/cdxAdWR3O97Y/?ref=app
26th Apr 2020, 3:12 PM
Lothar
Lothar - avatar
+ 4
Post your code seperately ,linking from here won't help us seeing your code ,it will take us to our solution only ,
26th Apr 2020, 10:55 AM
Abhay
Abhay - avatar
+ 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")
26th Apr 2020, 12:01 PM
Ritika Rani
Ritika Rani - avatar