Thank you dude, i have an assignment for engineering that i got completely
stumped on, on the last question. After watching this i was able to do it
in about 3 minutes.
Hey Jake I did this lesson. Then the gears in my brain started turning and
I condensed this lesson down to about 2 lines of code. Granted I've been
studying on codecademy, ruby monk, and beginning ruby (the book) as well as
these lessons but still. I was excited I was able to do that because it
means progress is being made! Anyway here's the code:
def hypo_calc(num, num_1)
num2 = num ** 2 + num_1 ** 2
puts "Your triangle's hypotenuse is #{Math.sqrt(num2).round}"
end
hypo_calc(4, 3)