Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. year=int(input("Podaj rok"))
  2. month=input("Podaj miesiąc")
  3. if year%4==0 and year%100!=0 or year%400==0:
  4. print("Rok przestępny")
  5. else:
  6. print("365")
  7.  
  8. # january = ["styczeń",1]
  9. #february = ["luty",2]
  10. #march = ["marzec",3]
  11. #april = ["kwiecień",4]
  12. #may = ["maj",5]
  13. #june = ["czerwiec",6]
  14. #july = ["lipec",7]
  15. #august = ["sierpień",8]
  16. #september = ["wrzesień",9]
  17. #october = ["październik",10]
  18. #november = ["listopad",11]
  19. #december = ["grudzień",12]
  20.  
  21. #month_30 = [february,april,june,august,september,october,december]
  22. #month_31 = [january, march,may,july,september,november]
  23.  
  24. month_30 = ["styczeń","marzec","maj","lipiec","wrzesień","listopad",1,3,5,7,9,11]
  25. month_31 = ["kwiecień","czerwiec","sierpień","pażdziernik","grudzień",4,6,8,10,12]
  26.  
  27. if month=="luty" or month==2:
  28. print("28")
  29. elif month in month_30:
  30. print("30")
  31. elif month in month_31:
  32. else:
  33. print("nie istnieje")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement