Question:- Create a function called square that takes in a number and returns the square of that number. If what's passed in is not a float or an int, return "None"
Code:-
def square(x):
if x % 2 == 0:
return x**x
else:
return None
print(square(5))
Error:-
None !- 25 : square should return 25
Your Output
None