0

This python function gave me 2 bugs

function of checking is the number is even number https://code.sololearn.com/cRYXRigX4u9w/?ref=app

3/27/2020 2:55:53 PM

Karim gougue

1 Answer

New Answer

+1

def is_even(a): if a % 2 == 0: return True else: return False def test_is_even(): assert is_even(2) == True assert is_even(3) == False print("The code is correct") test_is_even() # is_even(2) expecting a return value while calling in your code. ex assert is_even(2) == True, here you must return a True or False to compare with True or False.