my-psb/hks/013-print-even-numbers.py

40 lines
454 B
Python

#!/usr/bin/env python3
# coding: utf8
"""base-13-print-even-numbers"""
def print_even_numbers(start, stop):
"""
Function documentation
:Examples:
>>> print_even_numbers(1, 45)
2
4
6
8
10
12
14
16
18
20
22
24
26
28
30
32
34
36
38
40
42
44
"""
if start % 2 != 0:
start +=1
for numb in range(start, stop, 2):
print(numb)