Advertisement
teslariu

trim

Apr 24th, 2021
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. """ Programa que pide un mes e indica el trimestre"""
  5.  
  6. mes = input("Por favor, ingrese el nombre del mes: ")
  7. mes = mes.lower();
  8.  
  9. if mes=="enero" or mes=="febrero" or mes=="marzo":
  10.     print("Primer trimestre")
  11.  
  12. elif mes=="abril" or mes=="mayo" or mes=="junio":
  13.     print("Segundo trimestre")
  14.    
  15. elif mes=="julio" or mes=="agosto" or mes=="septiembre":
  16.     print("Tercer trimestre")
  17.    
  18. elif mes=="octubre" or mes=="noviembre" or mes=="diciembre":
  19.     print("Cuarto trimestre")
  20.  
  21. else:
  22.     print("Opción incorrecta")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement