Created
August 30, 2021 06:31
-
-
Save pamelafox/3de892f8a8bc810d127783c6e7851287 to your computer and use it in GitHub Desktop.
Count Evens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Write a function that will count the number of even numbers between a given start number and a given end number. | |
It should include the start or end if they are even. | |
""" | |
def count_evens(start, end): | |
""" | |
>>> count_evens(2, 2) | |
1 | |
>>> count_evens(-2, 52) | |
28 | |
>>> count_evens(237, 500) | |
132 | |
""" | |
# YOUR CODE HERE | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment