Advertisement
teslariu

primero

Jun 26th, 2021
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.93 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. """
  5. Programa que pide un nùmero de mes 1 al 12 y devuelve el cuatrimestre
  6. Ej:
  7. >>> Ingrese un nro de mes (1 enero, 2 febrero, .... etc): 5
  8. >>> Segundo cuatrimestre
  9. """
  10.  
  11. while True:
  12.    
  13.     #############################################################
  14.     numero_mes = int(input("Ingrese un nro de mes (1 enero, 2 febrero, .... etc): "))
  15.  
  16.     if  0 < numero_mes < 5:
  17.         print("Primer cuatrimestre")
  18.         print("Buenisimo")
  19.         a = 2 + 3.5
  20.  
  21.     elif 4 < numero_mes < 9:
  22.         print("Segundo cuatrimestre")
  23.  
  24.     elif 8 < numero_mes < 13:
  25.         print("Tercer cuatrimestre")
  26.  
  27.     else:
  28.         print("error")
  29.     ###############################################################
  30.        
  31.     opcion = input("Presione cualquier tecla para continuar (o '1' para salir): ")
  32.     if opcion == "1":
  33.         print("Gracias por usar este programa...")
  34.         break
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement