I tried a coding challenge i.e. password validator but I'm having few issues with it Help! EDIT : SOLVED! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

I tried a coding challenge i.e. password validator but I'm having few issues with it Help! EDIT : SOLVED!

https://code.sololearn.com/c4Ldpij5zV9l/?ref=app Here is it. The program doesn't output anything when wrong password is entered.. Works perfectly fine with correct password. I just want it to print "The password is invalid in case of wrong password" rather then just giving no output! EDIT : SOLVED BY ~swim~

27th Jul 2019, 7:50 AM
Rohit Panchal
Rohit Panchal - avatar
19 Answers
+ 1
~ swim ~ Thanks
27th Jul 2019, 10:12 AM
Rohit Panchal
Rohit Panchal - avatar
0
Frenchtoast elif is not gonna work in this case I guess..as we need the program to meet a few number of conditions not only 1.
27th Jul 2019, 8:04 AM
Rohit Panchal
Rohit Panchal - avatar
0
~ swim ~ so I should basically provide a else statement with all if statements?
27th Jul 2019, 8:06 AM
Rohit Panchal
Rohit Panchal - avatar
0
~ swim ~ not working
27th Jul 2019, 8:12 AM
Rohit Panchal
Rohit Panchal - avatar
0
~ swim ~ wait lemme update the code
27th Jul 2019, 8:12 AM
Rohit Panchal
Rohit Panchal - avatar
27th Jul 2019, 8:14 AM
Rohit Panchal
Rohit Panchal - avatar
0
Your "in"s are messed up. You are importing functions, not strings to run through.
27th Jul 2019, 8:16 AM
Frenchtoast
Frenchtoast - avatar
0
Frenchtoast Lemme try it
27th Jul 2019, 8:16 AM
Rohit Panchal
Rohit Panchal - avatar
0
Frenchtoast thats not the case it used to work completely fine before putting the else statements just it was unable to output the condition where it fails... It just leaves the output empty
27th Jul 2019, 8:19 AM
Rohit Panchal
Rohit Panchal - avatar
0
Works fine for the valid cases
27th Jul 2019, 8:19 AM
Rohit Panchal
Rohit Panchal - avatar
0
I got that answer and read it. ~ swim ~
27th Jul 2019, 8:36 AM
Rohit Panchal
Rohit Panchal - avatar
0
If you are talking about the one in which you defined valid = True
27th Jul 2019, 8:36 AM
Rohit Panchal
Rohit Panchal - avatar
0
That doesn't worked.. even that codes gives out Invalid for a valid input ~ swim ~
27th Jul 2019, 8:37 AM
Rohit Panchal
Rohit Panchal - avatar
0
Idk maybe something wrong with app.. I can't see it either now.. but when I clicked it for the first time from notifications I was able to read it
27th Jul 2019, 8:39 AM
Rohit Panchal
Rohit Panchal - avatar
0
Maybe you can save them as code and then share the link
27th Jul 2019, 8:40 AM
Rohit Panchal
Rohit Panchal - avatar
0
I was doing it for last 1 hour before coming here for help... Sure is a trick one..
27th Jul 2019, 8:41 AM
Rohit Panchal
Rohit Panchal - avatar
0
Frenchtoast read that bro. But rather then knowing there way I just wanna know where am I making mistake.... Learning from your own mistake is beauty of coding!
27th Jul 2019, 8:43 AM
Rohit Panchal
Rohit Panchal - avatar
27th Jul 2019, 11:34 PM
Worth Durck
Worth Durck - avatar