Advertisement
teslariu

horoscopo

Apr 24th, 2021
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. """
  5. Script que lee un dia de nacimiento (1,2,3,...31) y un mes (enero,
  6. febrero, marzo, ... diciembre) y devuelve el signo del horoscopo
  7.  
  8. Aries: 21 de marzo hasta 20 de abril
  9. Tauro: 21 de abril al 20 de mayo
  10. ....
  11.  
  12. """
  13. dia = int(input("Ingrese el día (1,2,..31) de su nacimiento: "))
  14. mes = input("Ingrese el mes (enero, febrero,...) de su nacimiento: ")
  15.  
  16. mes = mes.lower()
  17.  
  18. if  20< dia <32 and mes == "marzo" or 0< dia <21 and mes == "abril":
  19.     print("Aries")
  20. elif 20< dia <32 and mes == "abril" or 0< dia <21 and mes == "mayo":
  21.     print("Tauro")
  22.    
  23.    
  24.    
  25. else:
  26.     print("Mes y/o dia incorrecto")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement