Ayuda con Desarrollo programa

Viendo 1 entrada (de un total de 1)
  • Autor
    Entradas
  • #19694

    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»></p>
    <p class=»MsoNormal»></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 10.5pt; font-family: ‘Tahoma’,sans-serif; mso-fareast-font-family: ‘Times New Roman’; color: #333333; mso-fareast-language: ES-CO;»>Buenas tardes alguien me podría colaborar con este problema de una clase.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 10.5pt; font-family: ‘Tahoma’,sans-serif; mso-fareast-font-family: ‘Times New Roman’; color: #333333; mso-fareast-language: ES-CO;»> </span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 10.5pt; font-family: ‘Tahoma’,sans-serif; mso-fareast-font-family: ‘Times New Roman’; color: #333333; mso-fareast-language: ES-CO;»>La Universidad de software AllStacks necesita un sistema de información para</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>gestionar los pensums o currículos de los programas que ofrece, ya que este</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>será la base sobre la que se construirá un el sistema de matrículas. Usted hace</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>parte del equipo de desarrollo y su Jefe le encargó implementar la</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>funcionalidad de modificar una materia de un pensum, además, le dió la</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>especificación de la definición de las estructuras de datos.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Dado que un pensum tiene </span><span style=»font-size: 12.0pt; font-family: ‘Cambria Math’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-bidi-font-family: ‘Cambria Math’; mso-fareast-language: ES-CO;»>𝑛</span><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»> semestres y estos son ordinales, es decir,</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>primero está el semestre 1, luego está el semestre 2 y así, este es</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>representado por una lista donde cada posición será un semestre, este no</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>puede ser una tupla dado que necesitamos modificarlo.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Cada semestre es, a su vez, una colección, esta vez de materias, estas tienen</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>un código que las permite identificar y no son ordinales, por lo tanto los</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>semestres serán representados como diccionarios donde las claves serán los</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>códigos de las materias y en las claves estarán las materias.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Por último tenemos a las materias, dado que necesitamos almacenar el</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>nombre y cantidad de créditos de las mismas, también usaremos diccionarios.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>A continuación se le muestra un ejemplo de un pensum de un programa de 3</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>semestres que solo se le añadieron materias en el primer semestre:</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>pensum = [
    {‘0123’: {‘nombre’: ‘intro a la ing’, ‘créditos’: 2},
    ‘4567’: {‘nombre’: ‘inglés’, ‘créditos’: 1}},
    {}, {}
    ]</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Como se mencionó, solo 2 materias fueron añadidas al primer semestre, la</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>primera tiene código: 0123, nombre: intro a la ing y créditos 2, la segunda tiene</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>código: 4567, nombre: inglés y créditos 1.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>TAREAS</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Dado un pensum como el ya descrito, para implementar la funcionalidad debe:</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>● Validar que el número del semestre donde está la materia que el</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>usuario modificar si corresponde a un semestre.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>● Validar que el semestre que se desea modificar no esté vacío.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>● Validar que el código de la materia a modificar esté en el semestre</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>seleccionado por el usuario.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Luego de las validaciones puede proceder a modificar el nombre y créditos de</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>la materia seleccionada por los valores proporcionados por el usuario.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>FORMATO DE ENTRADA</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Las entradas de la función </span><span style=»font-size: 12.0pt; font-family: ‘Cambria Math’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-bidi-font-family: ‘Cambria Math’; mso-fareast-language: ES-CO;»>𝑚𝑜𝑑𝑖𝑓𝑖𝑐𝑎𝑟</span><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>_</span><span style=»font-size: 12.0pt; font-family: ‘Cambria Math’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-bidi-font-family: ‘Cambria Math’; mso-fareast-language: ES-CO;»>𝑚𝑎𝑡𝑒𝑟𝑖𝑎</span><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»> están escritas en la plantilla de la</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>solución, por favor NO eliminarlas o modificarlas, esto podría resultar en un</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>fallo en su calificación.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>● </span><span style=»font-size: 12.0pt; font-family: ‘Cambria Math’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-bidi-font-family: ‘Cambria Math’; mso-fareast-language: ES-CO;»>𝑝𝑒𝑛𝑠𝑢𝑚</span><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»> es la referencia a la estructura que se desea modificar.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>● </span><span style=»font-size: 12.0pt; font-family: ‘Cambria Math’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-bidi-font-family: ‘Cambria Math’; mso-fareast-language: ES-CO;»>𝑠𝑒𝑚𝑒𝑠𝑡𝑟𝑒</span><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»> es el número (int) del semestre en el que se encuentra la</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>materia que desea modificar el usuario.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>● </span><span style=»font-size: 12.0pt; font-family: ‘Cambria Math’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-bidi-font-family: ‘Cambria Math’; mso-fareast-language: ES-CO;»>𝑚𝑎𝑡𝑒𝑟𝑖𝑎</span><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»> es el código de la materia (string) que desea modificar el</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>usuario.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>● </span><span style=»font-size: 12.0pt; font-family: ‘Cambria Math’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-bidi-font-family: ‘Cambria Math’; mso-fareast-language: ES-CO;»>𝑛𝑜𝑚𝑏𝑟𝑒</span><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»> es el nuevo nombre (string) que desea el usuario para la materia</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>seleccionada.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>● </span><span style=»font-size: 12.0pt; font-family: ‘Cambria Math’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-bidi-font-family: ‘Cambria Math’; mso-fareast-language: ES-CO;»>𝑐𝑟𝑒𝑑𝑖𝑡𝑜𝑠</span><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»> es la nueva cantidad de créditos (int) que desea el usuario para</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>la materia seleccionada.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>FORMATO DE SALIDA</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>La salida de esta función está escrita en la plantilla de la solución, por favor NO</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>eliminarlas.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>La salida es la variable mensaje, si en la validación encuentra que el semestre</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>es inválido, usted debe guardar en esta variable EXACTAMENTE “Ingrese un</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>semestre válido”; si en la validación encuentra que el semestre es vacío, usted</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>debe guardar en esta variable EXACTAMENTE “El semestre no tiene materias”;</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>si en la validación encuentra que el el código de la materia no está en el</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>semestre seleccionado, usted debe guardar en esta variable EXACTAMENTE</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>“La materia no existe”; en caso de pasar todas las validaciones y lograr</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>modificar la materia, usted debe guardar en esta variable EXACTAMENTE</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>“Modificada con éxito”.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>NOTAS:</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>1. Recuerde que para el usuario el primer semestre o semestre 1 se</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>encuentra en la posición con índice cero en el pensum, usted debe tener</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>esto en cuenta para convertir la entrada del usuario apropiadamente .</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>2. Si en la validación se encuentra alguna entrada incorrecta, no se debe</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>modificar el pensum y se debe escribir el mensaje de error</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>correspondiente al caso en la variable mensaje como se indicó en la</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>sección Formato de Salida.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>EJEMPLO</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Suponiendo que se tiene el pensum de tres semestres presentado</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>anteriormente:</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Note que los semestres 4 y 0 no existen, el pensum solo tiene 3 semestres,</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>para ingresar un semestre válido, el usuario tendría que ingresar un número</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>entero entre 1 y 3, ambos incluídos. Además, es importante notar que el</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>mensaje de salida es el correspondiente a la validación que falla.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Aunque 2 es un semestre válido, este no tiene materias, por lo tanto no se</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>puede realizar la modificación satisfactoriamente.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Aunque 1 es un semestre válido y con materias, en este semestre no hay una</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>materia con el código 2345, por lo tanto no se puede realizar la modificación</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>satisfactoriamente.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>Observe que ahora todas las entradas fueron validadas y no se detectó ningún</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 12.0pt; font-family: ‘Times New Roman’,serif; mso-fareast-font-family: ‘Times New Roman’; mso-fareast-language: ES-CO;»>error, sólo entonces se efectuó la modificación en el pensum.</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 10.5pt; font-family: ‘Tahoma’,sans-serif; mso-fareast-font-family: ‘Times New Roman’; color: #333333; mso-fareast-language: ES-CO;»> </span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 10.5pt; font-family: ‘Tahoma’,sans-serif; mso-fareast-font-family: ‘Times New Roman’; color: #333333; mso-fareast-language: ES-CO;»>en el momento ya llevo parte del codigo desarrollado pero no se si esta corrector</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 10.5pt; font-family: ‘Tahoma’,sans-serif; mso-fareast-font-family: ‘Times New Roman’; color: #333333; mso-fareast-language: ES-CO;»>este seria el codigo:</span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 10.5pt; font-family: ‘Tahoma’,sans-serif; mso-fareast-font-family: ‘Times New Roman’; color: #333333; mso-fareast-language: ES-CO;»> </span></p>
    <p class=»MsoNormal» style=»margin-bottom: .0001pt; line-height: normal;»><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»> pensum[semestre + </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #09885a; mso-fareast-language: ES-CO;»>1</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>][materia][</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>»nombre»</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>] = nombre
    pensum[semestre + </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #09885a; mso-fareast-language: ES-CO;»>1</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>][materia][</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>»creditos»</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>] = creditos
    mensaje = </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>»la materia éxito…»</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>

    </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: green; mso-fareast-language: ES-CO;»># ACÁ TERMINA LA FUNCIÓN modificar_materia</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>
    </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: green; mso-fareast-language: ES-CO;»># NO MODIFIQUES LA SIGUIENTE LÍNEA</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>
    </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #af00db; mso-fareast-language: ES-CO;»>return</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»> mensaje

    pensum = [
    {</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>’0123′</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>: {</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>’nombre'</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>: </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>’intro a la ing'</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>,</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>’créditos'</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>: </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #09885a; mso-fareast-language: ES-CO;»>2</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>}, </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>’4567′</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>: {</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>’nombre'</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>: </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>’inglés'</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>, </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #a31515; mso-fareast-language: ES-CO;»>’creditos'</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>: </span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: #09885a; mso-fareast-language: ES-CO;»>1</span><span style=»font-size: 10.5pt; font-family: ‘Courier New’; mso-fareast-font-family: ‘Times New Roman’; color: black; mso-fareast-language: ES-CO;»>}},
    {},
    {}
    ]</span><span style=»font-size: 10.5pt; font-family: ‘Tahoma’,sans-serif; mso-fareast-font-family: ‘Times New Roman’; color: #333333; mso-fareast-language: ES-CO;»>

    si alguien me puede colaborar se los agradecería. </span></p>

Viendo 1 entrada (de un total de 1)
  • Debes estar registrado para responder a este debate.