Loading…
Everything will be ready in few seconds
- Theory
- Theory
- Comments
Simple comparisons
In the previous task, we compared the daily amount of eaten food with the daily amount of food that the Muffin can eat. And we solved one more task of the boss.
But it’s getting even more difficult after this. Therefore, while we have a little break before the next task, let’s see how to use the comparison correctly.
In this task, we will practice using the operators “more” >
and “less” <
, dealing with correcting errors in the experimental development projects of the boss.
The Muffin found several markers of different colors on the flipchart of the sales department: one red, two yellow and three green. The boss decided that the colors of the markers are an excellent basis for predicting the market. He even wrote an analytical program, which should compare the number of markers and derive the corresponding forecasts. But the comparisons do not work for some reason: messages are logged saying that the forecast is unacceptable, although forecasts should be positive.
We must understand what is happening and correct the program so that the forecasts make the boss happy.
Although only the cat can make predictions for the market based on the colors of the markers in the sales department.
- script.js
Thanks! We’ll fix everything at once!
Comments