I’ve been trying my best but I just feel like I’m going backwards, and just not grasping it. This is what I have so far to start:
// Create a function call `determine_triangle_type`.
// It should have three inputs for the three sides of the triangle
// It must return "invalid", "equilateral", "isosceles" or "scalene".
function determine_triangle_type with number do
set side1 to number
set side2 to number
set side3 to number
if side1==0 and side2==0 and side3==0 do
return "invalid"
end
end
I keep getting this error: " Jiki tried to run the determine_triangle_type
function but it had a different amount of inputs to what he expected."
Am I at least on the right track? I thought at least 3 inputs would be needed, and I tried it without the extra number input. I would like to finish one of these harder ones without having to go to the Labs video for help. I feel like once I watch the video I get it, but I can’t solve it on my own.