Working With Function || Type A || Sumita Arora || Class 12 || Computer science || Information practices || Solution || 



Q1. A program having multiple function is considered better designed than a program without any function. Why?


Q2. What all information does a function header give you about the function?


Q3. What do you understand by flow of execution?



Q4. What are arguments? What are parameters? How these two terms are different yet related? Give example.


Q5. What is the utility of: -
(I) default arguments
(II) Keyword arguments?



Q6. Explain with a code example the usage of default arguments and keyword arguments.


Q7. Describe the different styles of functions in Python using appropriate examples.



Q8. Differentiate between fruitful functions and non-fruitful functions.



Q9. Can a function return multiple values how?



Q10. What is scope? What is the scope resolving rule of Python?


Q11. What is the difference between local and global variables?


Q12. When is global statement used? Why is its use not recommended?


Q13. Write the term suitable for following description:
(a) A name inside the parentheses of a function header that can receive a value.
(b) An argument passed to a specific parameter using the parameter name.
(c) A value passed to a function parameter.
(d) A value assigned to a parameter name in the function header.
(e) A value assigned to a parameter name in the function call.
(f) A name defined outside all function definitions.
(g) A variable created inside a function body.



Q14. What do you understand by local and global scope of variables? How can you access a global variable inside the function, if function has a variable with same name?

19 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post