*SOLVED* Need help on Ruby (Unit 2, Lesson 1)


#1

Hello fellow Code_Cademy users!

I'm new to the forums (and still fairly new to Code_Cademy), so if I've done something wrong with this topic, I apologize! :anguished:

Anyways, I have a problem with Ruby. I've already completed Unit 1 and tried to continue to Unit 2 (Lesson 1) but I was unable to get pass 88%. My issue was the last two review parts (Dare to Compare and Billions of Booleans).

If anyone can help me learn about what I did wrong, that would be great! :smiley:

Also, the test_(1, 2, or 3) = (true or false) are comments from Code_Cademy (as provided in the lesson). I just can't put the # symbol down without enlarging the text.

Here's what I have (Dare to Compare):

test_1 should be false
test_1 = 30000 == 10 // false

test_2 = should be false
test_2 = -4 =< -2 // false

test_3 = should be true
test_3 = 10 > 8 // true

Output (Dare to Compare):

(ruby):7: unterminated regexp meets end of file

Code_Cademy Response:

Oops, try again. Make sure to put an expression after each =!

Here's what I have (Billions of Booleans):

test_1 should be true
test_1 = (2 == 2) && (4 == 4) // true

test_2 = should be true
test_2 = (40 == 30) || (20 == 20) // true

test_3 = should be false
test_3 = !(false) // true

Output:

(ruby):7: unterminated regexp meets end of file

Code_Cademy Response:

Oops, try again. Make sure to put an expression after each =!


#2

Are you entering exactly this?

test_1 should be false
test_1 = 30000 == 10 // false

test_2 = should be false
test_2 = -4 =< -2 // false

test_3 = should be true
test_3 = 10 > 8 // true

See anything odd with the syntax highlighting?
How are comments made in Ruby?
Shouldn't lines 1, 4 and 7 be commented out?


#3

I took away the # because whenever I typed it into this topic it would enlarge the text a ton. (I never took it away when I was actually doing the lesson)

Like this:

test_1 should be false


#4

That's why forums need to be told not to do anything with the formatting of code. Some sport syntax highlighting as well. See how things turn very green in my last post? Where does that start and what did you intend to do at the place it starts?


#5

I figured out my problem, thanks for helping me! :slight_smile: