Leap Year?

calendar

Challenge #1: Leap Year?

Write a program that lets the end-user enter a year using 4 digits (“yyyy” format).

The program should inform the user whether the year entered is a leap year or not.

Challenge #2: Valid and Invalid Dates

Write a program that lets the end-user enter a date using the “dd/mm/yyyy” format.

The program should inform the user whether the date entered is a valid date or not using the following criteria:

“mm” Month Acceptable Date Range (“dd”)
01 January 1 to 31
02 February 1 to 29 on a leap year

1 to 28 otherwise

03 March 1 to 31
04 April 1 to 30
05 May 1 to 31
06 June 1 to 30
07 July 1 to 31
08 August 1 to 31
09 September 1 to 30
10 October 1 to 31
11 November 1 to 30
12 December 1 to 31
Share Button
Posted in Computer Science, Python - Intermediate, Python Challenges

Our Latest Book

Follow this blog