Computer Science, asked by vw1, 2 months ago

def function_2(a,b)
if a < 2
return b
else:
return b

Answers

Answered by AlastorMadEyeMoody
0

Answer:

b

Explanation:

it will always return b no matter what the value of a and b


AlastorMadEyeMoody: what error
vw1: File "", line 1
def function_2(a,b)
^
SyntaxError: invalid syntax
AlastorMadEyeMoody: use def myfunction(a,b):
AlastorMadEyeMoody: if a<2:
AlastorMadEyeMoody: return a
AlastorMadEyeMoody: else:
AlastorMadEyeMoody: return b
vw1: thank you
AlastorMadEyeMoody: np
vw1: may i give you another exercise
Similar questions