LearnPy Hub
← Iterators & Generators problems
Easy

Even Generator

Write a generator that yields the even numbers from 0 up to n (inclusive). Print them on one line.

Input

One integer n ≥ 0.

Output

One line.

Sample 1

Input
10
Output
0 2 4 6 8 10

Sample 2

Input
0
Output
0
solution.py
Output appears here
Even Generator · Python practice problem · LearnPy Hub