Ruby course bug?


#1


Why does this not pass muster?


https://www.codecademy.com/courses/ruby-beginner-en-XYcN1/2/5?curriculum_id=5059f8619189a5000201fbcb


Replace this line with your code.


#2

remove the space inside " "


#3

Yup, it's a bug then. The parser or whatever analyzes user code should be able to handle a space.


#4

The parser or whatever analyzes user code should be able to handle a space.

The lesson doesn't want that(space).you just have to do what you are told to do.


#5

FYI here's the lesson instructions quoted

Use the .each method on the odds array to print out double the value of each item of the array. In other words, multiply each item by 2.
Make sure to use print rather than puts, so your output appears on one line.
Check the Hint if you get stuck!

As you can see, there's no mention of spaces, the solution I posted fits within the parameters of the instructions. If you are just some random user, I don't appreciate the hard time you're giving me about this. If you are someone who has anything to do with authoring this Ruby lesson, then please note that I've taken my time to point this out, you can either take it as an opportunity to improve the lesson, or not and just move on. Your choice. But I don't want to be made to feel like I did something wrong, because I didn't.


#6

sorry for making you feel that way.But absolutely it was not my intention.
I just wanted to tell you why it's not working as you expected.

In codecademy most of lessons are so strict that you can't pass doing something extra even if you complete all the instructions.

In your case

the lesson expects

26101418

but you did

2 6 10 14 18

both are not same.System checker doesn't allow it.

There's no mention of spaces it is because the lesson doesn't want it.The instruction will only tell you what it needs.


#7

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