Advertisement
teslariu

horoscopo

Mar 30th, 2021
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.71 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # escribir un programa que pida un fecha de nacimiento y devuelva su
  5. # signo del horoscopo
  6. # EJ
  7. # Ingrese el mes del nacimiento (enero, febrero,....): abril
  8. # Ingrese el dia de nacimiento (1,2,3......,31): 28
  9. # Su signo es Tauro
  10. # aries: 21 marzo - 19 abril
  11. # tauro: 20 abril - 20 mayo
  12.  
  13. mes = input("Ingrese el mes del nacimiento (enero, febrero,....):")
  14. dia = int(input("Ingrese el dia de nacimiento (1,2,3......,31):" ))
  15.  
  16. if (mes == "marzo" and 21<= dia <=31) or (mes == "abril" and 1<= dia <=19):
  17.     print("Aries")
  18. elif (mes == "abril" and 20<= dia <=30) or (mes == "mayo" and 1<= dia <=20):
  19.     print("Tauro")
  20.  
  21.    
  22. else:
  23.     print("Error de día y/o mes")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement