Advertisement
teslariu

trim

Aug 27th, 2021
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # script que pregunta el nombre de un mes e indica su trimestre
  5.  
  6. mes = input("Ingrese el 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