0

This python function gave me 2 bugs

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

27th Mar 2020, 2:55 PM
Karim gougue
Karim gougue - avatar
1 Odpowiedź
+ 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.
27th Mar 2020, 2:57 PM
Jayakrishna 🇮🇳