Learn Bash and SQL by Building a Bike Rental Shop

Hello — am currently stuck on the following unit in the Learn Bash and SQL by Building a Bike Rental Shop lesson:

When a user enters an option at the main menu, you want to take them to the appropriate sub-menu. You can use a case statement for this. Here’s an example:


The expression you want is the $MAIN_MENU_SELECTION variable. You are expecting it to be a 1, 2, or 3 for your various menus. Add a case statement that takes users to their corresponding menus. The * is for when anything else is entered. Take users to the MAIN_MENU when the variable isn’t a 1, 2, or 3.

My current code is:

I watch a video on youtube in the same problem, but with the same code He pass the test, can anyone help me ?

have you checked the hints? What did they say?
also what happens when you click run?

The hints basically gives me the same code, I also tried to copy and paste the response on hints but doesn’t work

here’s the print:

And the output in the run button is:
Your script should take you to the various menus and ouput the correct text

I am not sure if it will help, but I would fix the indentation to be exactly as shown.

I’ve tried but nothing changes, I try indentation, using just one line to separate the code

I see this video yesterday to see what was the problem, but I see the same code in Him screen and he passes the test

to compare
my code:

Him code:

can you show me when you tried to use the exact indentation as given though? (yours doesn’t match in any of the pictures). That is something I would try first. I would also try to reset and retry the code with correct indents.

I couldn’t see my code before because my Gitpod account timed out LOL, but now my credits have returned and I found the “mistake”.
For some reason my gitpod doesn’t count my VSCODE code as part of the code, so on the gitpod site my case statement didn’t exist and the coderoad extension couldn’t pass the test which I already fixed. I really appreciated your help Thank you very much

1 Like