Question: Write a function that tests if a number is even. HINT: Recall the modulo operator %. This performs division on two numbers, but instead of

Write a function that tests if a number is even. HINT: Recall the modulo operator %. This performs division on two numbers, but instead of returning their quotient, it returns the remainder of the division. For example, 7 % 3 returns 1, since the quotient is 2 with a remainder of 1. Your function should: be named is even take 1 argument, a number return True if the argument is even, False otherwise Make sure you're returning a boolean! Graded le 9]: assert is_even(3) == False Read Only +]: assert is_even(123456789) == False Read Only 1]: assert is_even(42) == True Read Only ]: assert is_even(42.1) == False Read Only
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
