Question: LEAP YEAR (PYTHON) Create a program to prompt a user to enter a year and determine if the year is a leap year. The rules

LEAP YEAR (PYTHON)

Create a program to prompt a user to enter a year and determine if the year is a leap year. The rules for leap year are as follows:

A Leap Year is any year that can be exactly divided by 4 (such as 2016, 2020, 2024, etc)

Except if it can be exactly divided by 100, then it isn't (such as 2100, 2200, etc)

Except if it can be exactly divided by 400, then it is (such as 2000, 2400) There are many ways to test the conditions using the if statements. Try to create a simple one. View the sample output. Make sure your output includes:

Instructions on what the user needs to do

Display what number they entered

Determine if the year is a leap year (or not)

The calendar for that year To be used in code:

input statement

if statements

calendar module Hints:

Make sure the number is an integer number

Create a flowchart for yourself to help with the logic

Sample Output:

Enter the year: 2000

2000 is a leap year.

February 2000

Mo Tu We Th Fr Sa Su

1 2 3 4 5 6

7 8 9 10 11 12 13

14 15 16 17 18 19 20

21 22 23 24 25 26 27

28 29

After you submit your code and I grade it, you can view my solution. You can use my code to fix\alter your code, but you need to use your own variables. (example: If I use the variable you would need to use something else. Challenge Code: Include in your code to prompt the use if they would like to enter another value. Make sure your directions are clear. Test to make sure they either entered Y or y.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!