+ 1

Password - message

Password - message Minimum length is 6 Maximum length is15. Print appropriate messages for each condition. Password - message. The passwords are inputs. ABd1234@1-Password is Okay. abc-Password is too short. PasswordIsVeryVeryVeryLong - password is very long

13th Dec 2018, 12:16 PM
Thotla Thirupathi
Thotla Thirupathi - avatar
7 odpowiedzi
+ 3
You can write something like: if min_length<=x<=max_length But then it will be hard to define different error reports.
13th Dec 2018, 12:24 PM
HonFu
HonFu - avatar
+ 3
Please try to understand what I wrote up there. I just showed you a pattern how you can evaluate in one run if x is > min AND < max: min < x < max.
13th Dec 2018, 12:44 PM
HonFu
HonFu - avatar
+ 2
Sorry, I do not understand what you meant by "How to access all conditions in Single one??"
13th Dec 2018, 12:21 PM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
What I did there is called pseudo-code: you write down the general idea, not the actual code. I could have also written: min<x<max. So you still have to 'translate' the idea to your code and your variables.
13th Dec 2018, 12:29 PM
HonFu
HonFu - avatar
+ 1
https://code.sololearn.com/cSCQyM5DKeaz/?ref=app How to access all conditions in Single one?? HonFu Kishalaya Saha
13th Dec 2018, 12:18 PM
Thotla Thirupathi
Thotla Thirupathi - avatar
0
It showing X is not defined HonFu
13th Dec 2018, 12:28 PM
Thotla Thirupathi
Thotla Thirupathi - avatar
13th Dec 2018, 12:37 PM
Thotla Thirupathi
Thotla Thirupathi - avatar