Tell us what’s happening:
#!/bin/bash
Bingo Number Generator
echo -e “\n~~ Bingo Number Generator ~~\n”
NUMBER=$(( RANDOM % 75 + 1 ))
TEXT="The next number is, "
echo $NUMBER
if (( NUMBER <= 15 ))
then
echo $TEXT B:$NUMBER
fi
Hi,
please could you help me, i don’t understand why my ode is not being accepted.
thank you!
Your code so far
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Norton/147.0.0.0
Challenge Information:
Build Five Programs - Build Five Programs
GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/workshop-bash-five-programs/5f5904ac738bc2fa9efecf5a.md at main · freeCodeCamp/freeCodeCamp · GitHub
@Teller,
I don’t understand what you’re referring to. Here’s the exact exercise statement:
You used the double square brackets with your if statement in the last program, but you can use the double parenthesis with these operators as well. 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:<number> .
I mistakenly thought you were asking about the completed project.
Please post a screenshot of the terminal.
Happy coding
Hi @fabienneelatelea
Press the Reset button and enter the if statement again.
The code looks right.
Happy coding
the script has too many echos I think…
should have max 2 echos at this point but i count 3
you should not have added a 3rd echo.
you should have modified the echo you had to print the message instead of adding a third one.
thank you, it was that problem.