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 Methods Method Arguments: Part 2

What's wrong

def subtract(a, b) puts "subtract #{a} and #{b}:" puts a - b and def multiply(b, c) puts "multiply #{

method.rb
What's wrong
def subtract(a, b)
  puts "subtract #{a} and #{b}:"
  puts a - b
and
def multiply(b, c)
  puts "multiply #{a} and #{b}:"
  puts b * c
end

subtract(2, 3)
multiply(6, 7)

2 Answers

Ari Misha
Ari Misha
19,323 Points

Hiya Gilda! your code is infact right on point. The challenge merely wants you to mention the syntax for creating a function or method. I know its silly but always stick to the challenge and try to avoid doing additional stuff or it'll throw an error. Here is the code in case you get confused again:

def subtract(a, b); end
def multiply(a, b); end

it worked! Thank you very much for your help :)