Future Ready Sale: Flat 75% + Addl. 25% Off + 30-days Extra Lab on self-paced Courses | Use Coupon FR25 in Checkout | Offer Expires In

  Enroll Now

Python - Videos and Questions

Print Even Numbers up to n

Write a function with the name print_even which takes one argument n. This function should print all even numbers starting from 0 up to but not including n.

This is how the definition is supposed to look:

def print_even(n):
    # This is where your code should print

Example Test Cases:

if n is 4, calling print_even(4) should print:

if n is 5, calling print_even(5) should print:

if n is 0, calling print_even(0) should not print anything.

No hints are availble for this assesment

Answer is not availble for this assesment

Note - Having trouble with the assessment engine? Follow the steps listed here