Home / Computer Science / [Type B] Working with Functions – Chapter 3 Sumita Arora Computer Science | CBSE Class 12 Sumita Arora Table of Contents Type B: Application Based Questions 1. What are the errors in following codes? Correct the code and predict output: 2. Find and write the output of the following Python code: 3. Consider the following code and write the flow of execution for this. Line numbers have been given for your reference. 4. What will the following function return? 5. What will the following function print when called? 6. What will be the output of the following programs? 7. Predict the output of the following code: 8. What is wrong with the following function definition? 9. Write a function namely fun that takes no parameters and always returns None. 10. Consider the code below and answer the questions that follow: 11. Consider the code below and answer the questions that follow: 12. Find the errors in the code given below: 13. Draw the entire environment, including all user-defined variables at the time line 10 is being executed. 14. Draw flow of execution for above program. 15. In the following code, which variables are in the same scope? 16. Write a program with a function that takes an integer and prints the number that follows after it: Call the function with these arguments: 4, 6, 8, 2+1, 4-3*2, 3-2. 17. Write a program with the non-void version of the above function and then write the flow of execution for both the programs. 18. What is the output of the following code fragments? 4. What will the following function return? Pythondef addEm(x, y, z): print(x + y + z) Solution: The function addEm will not return any value explicitly. It will only print the sum of x, y, and z. Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 "Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ AnonymousLinkedInPocketPrintTelegramWhatsApp