[Shell] Help us improve #cz2 Handle invalid commands

Hi everyone! I’m working on enhancing the experience for stage 2 of the Shell challenge.

If you’ve found anything confusing or unclear while tackling this stage, please share your feedback here. I’d love to hear your thoughts and suggestions!

Thanks in advance for helping us improve. :blush:

1 Like

code example shown in Python is incorrect. You cannot have “continue” stmt under “if” condition.

Hi @learning-dev, thanks for the feedback! Could you share a screenshot of the incorrect code example so I can take a closer look?

I’m doing this in ‘C’ , and I’m sure i’m writing the correct thing, and there’s only a difference of a space (’ ') between expected output and result output, and it’s not troubleshooting.

Hi @fraxard, the code in your screenshot looks correct, and there seems to be a disconnect between your code and the test results.

To debug, try deliberately printing something incorrect:

and see if it reflects in the test output. Let me know how it goes!

Hello, I am completing this challenge in C. It’d be great if there was more on what level of error handling you wanted for this level. I know C doesn’t have exception or error handling per se but if it was just simply appending an invalid command string at the end of the users input; that could have been explicitly stated and saved me some time. Thankfully @umar006 commented that this was the case.

1 Like

@1Dedios Thank you for the suggestion! I’ve incorporated it as part of our ongoing experiment in this PR.