Step: “In your script, create an if statement that uses double parenthesis for the condition. Check if the number variable is less than or equal to 15. If it is, use your two variables to print The next number is, B:.”
Error: Your script should have the suggested “if” statement
Tried changing NUMBER for $NUMBER in the if condition but still I get the same error. Also I tried copy-paste the if code from the hint button.
Your code so far
#!/bin/bash
# Bingo Number Generator
echo -e "\n~~ Bingo Number Generator ~~\n"
NUMBER=$(( RANDOM % 75 + 1 ))
echo $NUMBER
TEXT="The next number is, "
if (( NUMBER <= 15 ))
then
echo $TEXT B:$NUMBER
fi
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Challenge Information:
Learn Bash Scripting by Building Five Programs - Build Five Programs
can you click the Reset button and give it enough time to reset the exercise (you have to be patient and let it run till everything is reset in full or the whole thing will break)
Also then you can try to copy and paste the code again?
Hi @StarLex_03 , can you kindly outline the process you used to setup VSCode and CodeRoad? My version is very unstable and not recognizing the commands that I input the terminal. I followed instructions from this thread by installing the right version but the container doesn’t seem to care I am trying to learn
i used the process described in the course but when I tried to build the container, the coderoad install failed. So I had to switch v0.17.2 (the one that the repo tries to install is 0.15.2)
After that, I’m able to start coderoad but it does take a minute to load up fully. Then after that, I’m able to open a new bash terminal and work on the steps and everything goes well for me.
If you need more help, please open your own topic to ask for it. Or if you already have an open topic, please update it with the current situation you are in.
You can also join the fcc discord to discuss further if you like in the #programming-help channel
No, I’ve just read the last steps and they say nothing about deleting that echo command. I figured it out because there was and older post (which I couldn’t find before) that had the same problem.
Hello @michaelfrimpong543 , I also had lot of problemns setting up VSCode and CodeRoad but now it seems to work. I have a huawei laptop with Windows 11, and I don’t know if this is necessary, but I’ll tell you, I also have a subsystem of Ubuntu installed on it. What I did was:
When the container opened, it didn’t have CodeRoad, so I installed the v0.15.0.
Once installed, it showed the error of select a new workspace (or empty workspace), there, you should click the “Open Workspace” button and select the folder workspace(s)/project/
With that my VSC works perfectly, saving the progress and everything.
I don’t know if this was exactly what solved the problem because I’ve done a million things. I really hope that this also works for you cause I know the F frustation of being unable to set the whole thing up. Good luck! you’re gonna need it.
Happy coding
Moreover. I’ve just completed the five program lesson. And when I was about to start the next one, I kept receiving the error of “select an empty workspace”. In that case:
Open Docker Desktop and delete the container
Open the terminal and enter rdb.alpha/ and code .
Now select the option of open and rebuild container
Install CodeRoad 0.15.0
And now everything should be fine (or at least it wotks for me).