Science, asked by poojadarekar97, 5 months ago

What will be the output of code given below?

x=10
def func(num):
x=5
for i in num:
x *= i
return x
print(func((-2,-1,1,2,3)))​

Answers

Answered by ravinedrop07
0

Explanation:

Functions are a useful way to split your code into logical blocks, allow modularization, turn it more readable, and make it reusable. Also, functions are an intuitive way to create interfaces so the programmers can easily publicize their code.

Some cool facts – In Python, a function can return multiple values. It gets possible by returning the result in the form of a tuple. Also, you can list down the functions of a module by using the <getmembers()> function of the <inspect> module.

Now, enjoy running through the quiz.

Python Functions Quiz Part-2 (Advance Level)

Python Functions Quiz Part-2 for Experienced Programmers

Python Functions Quiz Part-2

Q-1. What is the output of the following code snippet?

def func( mylist ):

"This changes a passed list into this function"

mylist = [1,2,3,4]; # This

Answered by palakpatela2006
0

so sorry I can't understood your question

Similar questions