Last answered:

03 Apr 2022

Posted on:

01 Apr 2022


Have a doubt in practice exam

How will this code return an output of 3 if assigned 5 to the arguement of y. this question is in practice exam 1 (question 3)

def func_x(x):
return x-2

def func_y(y)
return func_x(y)

1 answers ( 0 marked as helpful)
Posted on:

03 Apr 2022


Hi Smriti!

Thanks for reaching out.

To create functions in Python, the relevant syntax requires from us to use colon and indentation after specifying the function name and argument. Please feel free to revise the following video from the course for further explanation:
With that in mind, please retry taking the question of the given practice exam.

Hope this helps.

Submit an answer