+ 5

[SOLVED]C#: Password Rules

Updated: Solved. See link for solution. I am having a difficult time figuring this out. It should be correct, but one of the hidden cases is failing and I don't know why. https://code.sololearn.com/ca34E9MTPFqi/?ref=app

30th Dec 2020, 5:07 PM
Chris
Chris - avatar
11 Answers
+ 1
TheWh¡teCat 🇧🇬 please disregard. I solved it. I was missing a break statement, so I figured out that the hidden case had multiple invalid symbols. I can label this as solved now. Updated code will be public for all to see.
30th Dec 2020, 5:27 PM
Chris
Chris - avatar
+ 1
Chris , in fact I didn't do anything. The second thing I was considering was that with many disallowed symbols it will print many times "Invalid".
30th Dec 2020, 5:33 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 1
That's exactly what was happening. I didn't realize this at first because the one failed case was hidden.
30th Dec 2020, 5:36 PM
Chris
Chris - avatar
0
Chris , provide the full description of the task also exapmple inputs and outputs.
30th Dec 2020, 5:11 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
Write a program to take the password as input and output "Invalid", if it contains any disallowed symbols. If the password requirement is satisfied, program shouldn't output anything. Sample Input yl1893!dm$ Sample Output Invalid
30th Dec 2020, 5:21 PM
Chris
Chris - avatar
0
I cannot tell you the case that is failing because it is hidden. C# 47.2 Practice
30th Dec 2020, 5:22 PM
Chris
Chris - avatar
0
Chris , is it mentioned the full list of the symbols in the task? It's hard to compare them with this in your code.
30th Dec 2020, 5:27 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
Yes. The full list of symbols were the ones listed in my code. In any event, it is solved now. Thank you so much for taking a look, though!
30th Dec 2020, 5:30 PM
Chris
Chris - avatar
0
cheers for this chris. i was struggling with this one myself. turns out my issue was i was trying to use the line if (password.Contains(notAllowedSymbols)) rather than if (password.Contains(i)) as in your example.
20th May 2021, 5:36 AM
Andrew Hall
Andrew Hall - avatar
0
https://code.sololearn.com/cPMkWNlJtRmK/?ref=app https://code.sololearn.com/cwq4Waeoi5SY/?ref=app https://code.sololearn.com/W5cA8c0W0So4/?ref=app https://code.sololearn.com/WP2Axj7ECgSX/?ref=app https://code.sololearn.com/cbts65Vuvq1j/?ref=app https://code.sololearn.com/WQIiQlOQbODw/?ref=app https://code.sololearn.com/W07cScpfBxOx/?ref=app https://code.sololearn.com/W3Lqf48P97cB/?ref=app https://code.sololearn.com/c65wW7G5Q9p5/?ref=app https://code.sololearn.com/cwPJxME21w29/?ref=app https://code.sololearn.com/W7Uh7s3OxJk7/?ref=app https://code.sololearn.com/cZJEHc18ufn5/?ref=app https://code.sololearn.com/cT1yWDZ0d6fR/?ref=app https://code.sololearn.com/WWHbNzIWt3op/?ref=app https://code.sololearn.com/Ws4ihzNSoyPd/?ref=app https://code.sololearn.com/cWQhLwc6YB70/?ref=app https://code.sololearn.com/W7lrNy4Jc0oj/?ref=app https://code.sololearn.com/ctZuOD8ubAsc/?ref=app https://code.sololearn.com/czeTg5sa3i5v/?ref=app https://code.sololearn.com/WWTg5bhzWSY6/?ref=app https://code.sololearn.com/WogTtVY04M4w/?ref
25th Jul 2022, 6:26 AM
‎طالب صیاحی‎
‎طالب صیاحی‎ - avatar
0
https://www.sololearn.com/discuss/3064367/?ref=app https://www.sololearn.com/discuss/3064172/?ref=app https://www.sololearn.com/discuss/3064682/?ref=app https://www.sololearn.com/discuss/3064746/?ref=app https://www.sololearn.com/discuss/3064235/?ref=app https://www.sololearn.com/discuss/3064809/?ref=app https://www.sololearn.com/discuss/3064105/?ref=app https://www.sololearn.com/discuss/3064677/?ref=app https://www.sololearn.com/discuss/3064546/?ref=app https://www.sololearn.com/discuss/3064099/?ref=app https://www.sololearn.com/discuss/3064483/?ref=app https://www.sololearn.com/discuss/3064160/?ref=app https://www.sololearn.com/discuss/3064736/?ref=app https://www.sololearn.com/discuss/3064126/?ref=app https://www.sololearn.com/discuss/3063998/?ref=app https://www.sololearn.com/discuss/3064254/?ref=app https://www.sololearn.com/discuss/3064508/?ref=app https://www.sololearn.com/discuss/3064380/?ref=app https://www.sololearn.com/discuss/3064378/?ref=app https://www.sololearn.com/discuss/3064183/?ref=app http
25th Jul 2022, 6:28 AM
‎طالب صیاحی‎
‎طالب صیاحی‎ - avatar
OSZAR »