Dare to compare complications


#1


https://www.codecademy.com/courses/ruby-beginner-en-NFCZ7/3/4?curriculum_id=5059f8619189a5000201fbcb

Error:
Oops, true again. Make sure to put an expression after each =!

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

The Dare to Compare exercise isn't making sense to me, and neither are the responses to all of the other questions I see where people are having the exact same issue/error (I see two others readily).

Overview:
Now let's review comparators / relational operators. We've turned the tables a bit!

Remember, comparators need to compare two values to each other to result in true or false

10 > 8 // true
8 > 10 // false
8 == 10 // false
8 != 10 // true

Instruction:
We're letting you know what value (true or false) we want each variable to have, and your job is to add an expression that evaluates to the correct value using comparators.

Thought Process:
The exercise is to create 3 tests with specific results (false, false, then true). I'm supposed to create an expression that ends up being true/false is predetermined.

Based on the overview it looks like I should be using <, >, ==, !=

Based on the overview it looks like I should include "// true" or "//false" at the end of each expression.

Script:

test_1 should be false

test_1 = 15 == 16 // false

test_2 = should be false

test_2 = 5 < 3 // false

test_3 = should be true

test_3 = 10 > 8 // true

Error:
Oops, true again. Make sure to put an expression after each =!

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

Conclusion:
I have no idea what any of this means. I haven't used =! anywhere so I don't know why they're telling me to use an expression after it.

I have no idea what the output means.

I was told test 1 should be false. 15 is not equal to 16, and I've included "// false" specifically because it was provided in the examples for this exercise.

I was told test 2 should be false. 5 is not less than 3 and I've included "// false" specifically because it was provided in the examples for this exercise.

I was told test 3 should be true. 10 is greater than 8 and I've included "// true" specifically beause it was provided in the examples for this exercise.

I would rather not just copy/paste the right answer. I kind of want to understand the fundamentals I'm trying to build here.


# test_1 should be false
test_1 = 15 == 16 // false

# test_2 = should be false
test_2 = 5 < 3 // false

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


#2

Your code is correct, but you should not add // true or // false. They were included in the overview only as comments.

# test_1 should be false
test_1 = 15 == 16

# test_2 = should be false
test_2 = 5 < 3

# test_3 = should be true
test_3 = 10 > 8

#3

Fantastic! Thank you! I removed that portion of the code and it worked just fine. I appreciate the help!

Do you have any idea why they haven't used the pound/hashtag symbol for notes as they have with all of the previous exercises?

ex:
10 > 8 # true
8 > 10 # false
8 == 10 # false
8 != 10 # true

In that example using lessons they've taught it's clear that the text after the pound/hashtag is not a part of the code.

It's very confusing for them to introduce new content "//" without an explanation of any kind.


#4

You're very welcome :slight_smile:

Do you have any idea why they haven't used the pound/hashtag symbol for notes as they have with all of the previous exercises?

It is a result of mistake, I am sure of that. You will find a lot of them in the old courses. They will not be fixed, but hopefully, pretty soon these courses will be renewed.


#5

Thank you for taking the time to explain that issue!

I almost like the irony of a website, teaching people programming languages to make websites, with critical errors that are known by the website and won't be fixed.

If nothing else, the irony is impressive, and I like that!

It was pretty frustrating trying to figure out what I was missing, going back over all of the previous lessons, searching for answers on the forums, then finding out that I was driving myself crazy for no reason. Enough ranting. Thanks again!


#6

You're very welcome.

Codecademy has many flaws and I was really frustrated for that reason. But codecademy has something that keeps me here helping others - great, vibrant community and awesome moderators.

And I have to admit it, there are some changes in codecademy that I really like. Content in new courses is improving. That's a good thing :slight_smile:


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.