Skip to content

4.3.1.6 LAB: A leap year: writing your own functions #19

@MagicBarrel7887

Description

@MagicBarrel7887

LAB

Estimated time

10-15 minutes
Level of difficulty

Easy
Objectives

Familiarize the student with:

projecting and writing parameterized functions;
utilizing the return statement;
testing the functions.

Scenario

Your task is to write and test a function which takes one argument (a year) and returns True if the year is a leap year, or False otherwise.

The seed of the function is already sown in the skeleton code in the editor.

Note: we've also prepared a short testing code, which you can use to test your function.

The code uses two lists - one with the test data, and the other containing the expected results. The code will tell you if any of your results are invalid.

Metadata

Metadata

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions