Answer to Question #329080 in Python for ratul

Question #329080

Write a function called even_checker that takes a number as an argument and prints whether

the number is even or odd inside the function.

===================================================================

Example 1:

Function Call:

even_checker(5)

Output:

Odd!!

===================================================================

Example2:

Function Call:

even_checker(2)

Output:

Even!!


1
Expert's answer
2022-04-15T16:34:33-0400
def even_checker(number: int):
    if number % 2 == 0:
        print('Even!!')
    else:
        print('Odd!!')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS