Advertisement
Guest User

Formica_ejercicio13

a guest
Mar 30th, 2020
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.00 KB | None | 0 0
  1. print('ingrese numero de dia')
  2. dia=int(input())
  3. semana1=["LUNES","MARTES","MIERCOLES","JUEVES","VIERNES","SABADO","DOMINGO"]
  4. print('ingrese numero de mes')
  5. mes=int(input())
  6. meses=["ENERO","FEBRERO","MARZO","ABRIL","MAYO","JUNIO","JULIO","AGOSTO","SEPTIEMBRE","OCTUBRE","NOVIEMBRE","DICIEMBRE"]
  7. print('ingrese Año')
  8. año=int(input())
  9. if (0<=dia<=6 and 0<=mes<=11 and 1900<=año<=2050):
  10.     print("Hoy es",semana1[dia],dia,meses[mes-1],"del año",año)
  11. elif  (7<=dia<=13 and 0<=mes<=11 and 1900<=año<=2050):
  12.     print("Hoy es", semana1[dia-7],dia,meses[mes-1],"del año",año)
  13. elif  (14<=dia<=20 and 0<=mes<=11 and 1900<=año<=2050):
  14.     print("Hoy es",semana1[dia-14],dia,meses[mes-1],"del año",año)
  15. elif  (21<=dia<=27 and 0<=mes<=11 and 1900<=año<=2050):
  16.     print("Hoy es", semana1[dia-21],dia ,meses[mes-1],"del año",año)
  17. elif  (28<=dia<=30 and 0<=mes<=11 and 1900<=año<=2050):
  18.     print("Hoy es", semana1[dia-28],dia,meses[mes-1],"del año",año)
  19. else:
  20.     print('no es una fecha correcta')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement