The answer is right but i know I'm wrong


#1



Hi guys, so i got through to the next round and I'm clearly wrong somehow since when i put in the number all i get is the same number. In example is you press 9... your going to get 9 nil instead of it being squared.

https://www.codecademy.com/en/courses/ruby-beginner-en-1o8Mb/3/5?curriculum_id=5059f8619189a5000201fbcb


n=gets.chomp
def square(n)
    n*n
end
print n


#2

Squaring a number means you multiply it by 2, not itself. :stuck_out_tongue:


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.