Need help with this arithmetic formatter

Hi, i need help with this python project, i have a traceback that i dont understand why, line 48

1 Like
    for linea in range(largo):
      lineas += "-"

    if problem != problems[-1]:
      primera_respuesta += primerlinea + '    '
      segunda_respuesta += segundalinea + '    '
      lineas += linea + "    " 

“for linea in range(largo):” has linea taking on a sequence of integer values. When the for loop finishes running, linea = the highest value for whatever largo is, which you defined earlier as a max (which is an integer) You can’t add an integer and a string, which is what you are trying to do in your last line. Although I think you probably just forgot an ‘s’ :stuck_out_tongue: