GatoBooster

Cuestionario 4 Ayudantía Módulo 1 - Mar 13/Septiembre.

Sep 13th, 2021
1,845
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.56 KB | None | 0 0
  1. #############################################################################################################################
  2. # ENTRADA
  3. numeroN = int(input())
  4.  
  5. # PROCESO & SALIDA
  6. for i in range(numeroN) :
  7.     print("HOLA !")
  8. print("FIN")
  9. #############################################################################################################################
  10. totalAlumnos = int(input())
  11.  
  12. menor = 7
  13.  
  14. for contAlumno in range (totalAlumnos) :
  15.     nota = float(input())
  16.     if nota < menor :
  17.         menor = nota
  18.  
  19. print("Menor nota final :",menor)
  20. #############################################################################################################################
  21. totalAlumnos = int(input())
  22.  
  23. mayor = 1
  24.  
  25. for contAlumno in range (totalAlumnos) :
  26.     nota = float(input())
  27.     if nota > mayor :
  28.         mayor = nota
  29.  
  30. print("Mayor nota final :",mayor)
  31. #############################################################################################################################
  32. # ENTRADA
  33. totalAsistentes = int(input())
  34.  
  35. # PROCESO
  36. cantidadMayores = 0
  37. for aux in range(1,totalAsistentes+1) :
  38.     edad = int(input())
  39.     if edad >= 18 :
  40.         cantidadMayores = cantidadMayores + 1
  41. if cantidadMayores == totalAsistentes :
  42.     print("Todos eran mayores de edad")
  43. elif cantidadMayores == 0 :
  44.     print("No hubo mayores de edad")
  45. else :
  46.     print("Cantidad de mayores de edad:",cantidadMayores)
  47. #############################################################################################################################
  48. # entrada
  49. numeroN = int(input())
  50.  
  51. # proceso & salida
  52. aux = numeroN + 1
  53. total = 0
  54. while total < 5 :
  55.     if aux % 2 == 1 :
  56.         print(aux,end=" ")
  57.         total = total + 1
  58.     aux = aux + 1
  59. #############################################################################################################################
  60. # ENTRADA
  61. numeroN = int(input())
  62.  
  63. # PROCESO & SALIDA
  64. for numero in range(1,numeroN+1) :
  65.     if (numero % 3)>0 and (numero % 7)>0 :
  66.         print(numero,end=" ")
  67. #############################################################################################################################
  68. # ENTRADA
  69. a = int(input())
  70. b = int(input())
  71.  
  72. # PROCESO
  73. suma = 0
  74. for num in range(a,b+1) :
  75.     if (num % 2 == 0) and (num % 3 == 0) :
  76.         suma = suma + num
  77. # SALIDA
  78. if suma == 0 :
  79.     print("NO EXISTEN NUMEROS DIVISIBLES POR 2 Y POR 3 EN EL INTERVALO")
  80. else :
  81.     print("SUMA =",suma)
  82. #############################################################################################################################
  83.  
Advertisement
Add Comment
Please, Sign In to add comment