Section 1.4 math


#1

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?

http://www.codecademy.com/en/tracks/ruby


Replace this line with your code.


#2
  • 3
    => 53

60 - 4
=> 56

2**3
=> 6

25/5
=> 5

2**3
=> 8

14%3
=> 2


#3

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


#4

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


#5

Could you post a screenshot please?


#6

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


#7


#8

like this? ....................


#9

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.


#10

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


#11

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."


#12

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?


#13

@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.


#14

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


#15

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.


#16

A post was split to a new topic: Ruby Math


#17