Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMaurice Tafolla- Cunningham
7,708 PointsWhy is this not working? Ruby Operators and Control Structures
The question asks "write the Ruby code to check if the variable "a" is greater than variable "b".
My code looks like this:
"a" > "b" and it was returned incorrect.
I moved the variables and signs into every configuration. Then I did this:
a = 1
b = 2
"a" > "b"
Then I removed the quotation marks:
a = 1
b = 2
a > b
This is stupid.
a = 1
b = 2
a > b
1 Answer
Geoff Parsons
11,679 PointsYour answer is correct (a > b), you just don't need to set values for a and b beforehand.