Built in functions


#1

def distance_from_zero(aze):
if type(-10) == int or type(10) == float:
return abs(10)
elif:
return "Nope"
Oops, try again. Your function seems to fail on input -9 when it returned '10' instead of '9'
need help


#2

Our function just does not handle one value ( 10 or -10)but it can handle any number of inputs ( we can call our function many times we want) and gives us o/p , input-wise.

Here the general variable or say our input(to be exact function parameter) is aze.

so type(aze) == int and same for other test.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.