<prompt> Kuandika Ruby script kuchapisha spiral ya nambari mfululizo kuanzia 1 katika kona ya juu kushoto. upande wa mraba itakuwa N.  <response>: Heres an implementation of a Ruby script that prints a spiral of sequential numbers starting from 1 in the upper left corner. The side of the square is specified using the variable n.n 5matrix Array.newn Array.newn, 0 count 1row_start 0row_end n - 1col_start 0col_end n - 1 while row_start row_end col_start col_end col_start..col_end.each do i matrixrow_starti count count 1 end row_start 1 row_start..row_end.each do i matrixicol_end count count 1 end col_end - 1 if row_start row_end col_end.downtocol_start.each do i matrixrow_endi count count 1 end row_end - 1 end if col_start col_end row_end.downtorow_start.each do i matrixicol_start count count 1 end col_start 1 endend matrix.each do row row.each do element print elementt end putsendFor example, if we set n 5, the output will be:12345161718196152425207142322218131211109 