Puts or print the result of a method

Hi there,

I have a simple method:

def square(num)

how do I enter a number to feed in and puts or print the result?

Thank you

Got it.

square (10)

You got it!

Consider also:

x = 10
print “The square of #{x} is #{square(x)}.\n”

And for more fun:

x = 9
print “#{x} squared is #{square(9)}.\nIn binary that’s %b.\n” % square(9)