Section 1.4 math

please help! i don’t understand exactly what i have to do. Practice maths in the editor they say. The editor is not the script.rb? I’ve done some exercices but i have an error message. Maybe my syntaxe is not correct?
<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>


Replace this line with your code.

<do not remove the three backticks above>
  • 3
    => 53

60 - 4
=> 56

=> 6

=> 5

=> 8

=> 2

Yes the editor is script.rb. What error message are you getting?

1 Like

Oops, try again. Make sure to do at least one math calculation in the editor!

Could you post a screenshot please?

1 Like

sorry i don’t know how to do it. i’m looking on google:confused:

like this? …

Yes, thanks, now I can see what you are doing … Don’t type the answers into the editor – just put the math problem and let Ruby get the answer for you.

1 Like

:slight_smile: YESSSS IT WORK! Thank you for your help!!

1 Like

Yes, this section could use a better set of instructions.

Instead of:

“Do a little math practice in the editor. When you’re ready, click Save & Submit Code to move on to the next exercise.”

they might say:

“Assign a variable a value, and then, using one of the arithmetic operators, write a practice equation for that variable on the next line. When you’re ready, click Save & Submit Code to see if your code worked and to move on to the next exercise.”

1 Like

Hi, I am stuck in the same spot and after reading these comments, I still don’t understand. I am just putting in the math statement (3 + 4 then hit enter), and there is no output. what exactly do I have to type?

@megbig8 If you already have 3 + 4 in the editor, you should be able to click the ‘Save and Submit Code’ button and move on.

thanks! Was expected it to output, so that’s why I was confused.

This annoyed me beyond belief. I think the course is inconsistent. Sometimes it tells you to create output, sometimes it doesnt.

If you use the other lessons you can figure out how to get output.

A post was split to a new topic: Ruby Math