Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

Evan Johnson
PLUS
Evan Johnson
Courses Plus Student 1,177 Points

I have a question on my coding challenge. Its very simple but for some reason it isn't working. It is in Ruby btw.

Write the Ruby Code to check if the variable "a" is greater than the variable "b". Now I've tried almost everything.

I've tried

a>b

b<a

"a">"b"

"b">"a"

i've tried assigning values to a and b and doing all of the above but it still doesnt work. is it bugged or am i missing something. ANY HELP would be appreciated. Thanks

2 Answers

Hi Evan,

You need to make space between a and b strings

a > b
Evan Johnson
PLUS
Evan Johnson
Courses Plus Student 1,177 Points

Thanks I'm, coming from c ++ where its not nessecary to make the space between the two strings. Also the instructor didnt mention it and he assumed it. But thanks!