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!

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

Didn't understood the question.

Set the variable product to be a multiple of the variables a and b. a = 6 b = 2

a = 6
b = 2

2 Answers

The question is asking you to multiply a * b and assign it to a variable called product. Try this out:

a = 6
b = 2

# Multiply a*b and assign it to product.
product = a * b

NOTE: Don't get confused with the

# Multiply a*b and assign it to product.

line of code. I was just leaving a comment (basically a message. You'll learn all about comments soon in your course!). You can totally delete that line, or just include it in the code challenge. Ruby just ignores that line because it starts with a # (which, makes a comment).

I hope that works out! :smile:

Thanks, that works perfectly.