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 trial

Ruby Ruby Basics (Retired) Ruby Numbers Multiplication and Division

Task: Set the variable product to be a multiple of a & b. a=6 b=2

a = 6 b = 2 12 Shouldn't the answer be 12?

variable.rb
a = 6
b = 2
c = 12
Neil Ganotisi
Neil Ganotisi
20,975 Points

Right idea, but you missed a few critical things. You'll need to declare a variable 'product', and set it to be the product of the multiple of 'a' and 'b'.

a = 6
b = 2

product = a*b

2 Answers

Thanks, Neil. You are correct. That worked. What's odd is this wasn't one of the formulas shown in the video series. I even checked the script on each video. Same thing with the second question. It's not material that's been gone over:

Set the variable quotient to be the result of dividing the product variable by 3. (The question might as well be in Arabic - something I'm not familiar with)

This is what your not seeing Sarah Set the variable.. in order to write code with variables you put the variable which is PRODUCT in the front like this product =