Is this right? Password validate | Sololearn: Learn to code for FREE!

+3

Is this right? Password validate

https://code.sololearn.com/c5eD5fDH5kq0/?ref=app

8/26/2019 9:38:08 AM

Wayne Pht

7 Answers

New Answer

+7

1. You have not checked whether there are both capitalized and non-capitalized characters. 2. For improving efficiency, learn RegEx. https://www.sololearn.com/learn/9704/?ref=app

+2

Thank you Gordon for the answer, for the 1. I made the code with the challenge in learncode where capitalize letters are not a condition =) Thanks for RegEx I will learn it!

+2

Ur indentation is off. The code doesn't work.

+1

The code I just add for password validate, it works on my laptop but I don't know if it's efficient

+1

You are welcome, Wayne. I like to highlight some example codes in our Coding Challenge (a. k. a. Assignment) section. https://www.sololearn.com/learn/7028/?ref=app 1. Michal's - smart but not a good practice, in terms of team collaboration. https://code.sololearn.com/c2G86cu62B1c/?ref=app 2. Anna's - succinct and well structured. https://code.sololearn.com/c2HFPU6uK4JI/?ref=app 3. David Carroll's - Explaining RegEx in detail. https://code.sololearn.com/cgjn2TAuakXA/?ref=app - - - There is another series of RegEx tutorial curated by Danijel Ivanovic. It is demonstrated in Java / JavaScript, but the RegEx is the same. https://code.sololearn.com/Wx88zgigVueq/?ref=app https://code.sololearn.com/W6UCupGsRwzB/?ref=app

0

Thanks thoq I fixed it

0

You are probably better learning regular expressions for a task like this. Im still a python novice but this is my example using some regex. https://code.sololearn.com/cvgLH0cp2Wks/?ref=app