Advertisement
teslariu

ej1

Jul 15th, 2021
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.72 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # 1 condicional: if
  5. # 2 bucles: while, for
  6.  
  7. while True:
  8.    
  9.    
  10.     #########################################
  11.    
  12.     mes = int(input("Ingrese un nro de mes (1,2,3,.....12): "))
  13.  
  14.     if 1 <= mes <= 4:
  15.         print("Primer cuatrimestre")
  16.  
  17.     elif 5 <= mes <= 8:
  18.         print("Segundo cuatrimestre")
  19.    
  20.     elif 9 <= mes <= 12:
  21.         print("Tercer cuatrimestre")
  22.  
  23.     else:
  24.         print("Error en nro de mes")
  25.        
  26.     #############################################
  27.    
  28.     opcion = input("\nPresione cualquier tecla para continuar ('1' para salir): ")
  29.     if opcion == "1":
  30.         print("Gracias por usar este programa...")
  31.         break
  32.    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement