You can download this code by clicking the button below.
This code is now available for download.
This function defines nested functions to perform division and check if an integer is even or odd.
Technology Stack : Built-in functions (try-except, /, %)
Code Type : Function
Code Difficulty : Intermediate
def aaaa(arg1, arg2, arg3):
def bbbb():
try:
return arg1 / arg2
except ZeroDivisionError:
return "Cannot divide by zero"
def cccc(arg):
if arg % 2 == 0:
return "Even"
else:
return "Odd"
return bbbb(), cccc(arg3)