Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 7 (4 points): 3 criteria must be taken into account to identify leap years: The year is evenly divisible by 4; If the year

image text in transcribed
Problem 7 (4 points): 3 criteria must be taken into account to identify leap years: The year is evenly divisible by 4; If the year can be evenly divided by 100, it is NOT a leap year, unless; The year is also evenly divisible by 400. Then it is a leap year. Write a function that takes a year as a parameter and returns True if the year is a leap year, False otherwise. Problem 8 (5 points): Implement the calculator for the date of Easter. The following algorithm computes the date for Easter Sunday for any year between 1900 to 2099. Ask the user to enter a year. Compute the following: a = year % 19 b=year % 4 C = year %7 d = (19. a +24) % 30 e = (2*b+4*c+6d+5)%7 dateOfEaster = 22 +d+ e . . Special note: The algorithm can give a date in April. Also, if the year is one of four special years (1954, 1981, 2049, or 2076) then subtract 7 from the date. Your program should print an error message if the user provides a date that is out of range

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions