< Back

Post Lab 2

In this post-lab you will demonstrate your understanding of mathematical expressions in Python.

Details

Create a new file called postlab2.py. In this file, write a program that computes the average number of days in a month during a four year span. Don't forget about leap years! Your program must use arithmetic operators to calculate the average; simply printing the average number is not sufficient.

Example

$ python3 postlab2.py
Each month averages 30.4375 days during a 4 year period.

Submission

Submissions for post labs are to be done via the inquire system. Go to http://inquire.roanoke.edu/ You should see a section for post labs. Submit your .py file to the appropriate post lab location.