🏠squaresquareSquareGlobals+-Cases+-0msdef square1(n) return n*n end p square1 10msdef square2(n) result = 0 n.times do result = result + n end return result end p square2 20msdef square3(n) result = 0 n.times do n.times do result = result + 1 end end return result end p square3 3