Pergunta de entrevista da empresa Uniper

Write a function to calculate if a year is a leap year.