➤ How to Code a Game
➤ Array Programs in Java
➤ Java Inline Thread Creation
➤ Java Custom Exception
➤ Hibernate vs JDBC
➤ Object Relational Mapping
➤ Check Oracle DB Size
➤ Check Oracle DB Version
➤ Generation of Computers
➤ XML Pros & Cons
➤ Git Analytics & Its Uses
➤ Top Skills for Cloud Professional
➤ How to Hire Best Candidates
➤ Scrum Master Roles & Work
➤ CyberSecurity in Python
➤ Protect from Cyber-Attack
➤ Solve App Development Challenges
➤ Top Chrome Extensions for Twitch Users
➤ Mistakes That Can Ruin Your Test Metric Program
Q1) If a function doesn’t have a return statement, which of the following does the function return?
a) None
b) null
c) int
d) An exception is thrown without the return statement
View Answer
Answer:- a) NoneQ2) What is called when a function is defined inside a class?
a) Class
b) Method
c) Another function
d) Module
View Answer
Answer:- b) MethodQ3) What are the two main types of functions?
a) System function
b) User function
c) Built-in function & User defined function
d) Custom function
View Answer
Answer:- c) Built-in function & User defined functionQ4) Select which is true for the Python function.
a) A Python function can return only a single value
b) A Python function can return multiple values
c) Python function doesn’t return anything unless and until you add a return statement
View Answer
Answer:- b) A Python function can return multiple valuesQ5) Which of the following refers to mathematical function?
a) rhombus
b) add
c) rhombus
d) sqrt
View Answer
Answer:- d) sqrtQ6) What is a recursive function?
a) A function which calls itself.
b) A function that calls other functions.
c) Both A and B
d) None of the above
View Answer
Answer:- a) A function which calls itself.Q7) Python supports the creation of anonymous functions at runtime, using a construct called __.
a) anonymous
b) pi
c) lambda
d) none of the mentioned
View Answer
Answer:- c) lambdaQ8) In which part of memory does the system store the parameter and local variables of a function call?
a) stack
b) heap
c) Uninitialized data segment
d) None of the above
View Answer
Answer:- a) stackQ9) What are the advantages of functions in python?
a) Improving clarity of the code
b) Reducing duplication of code
c) Decomposing complex problems into simpler pieces
d) All of the mentioned
View Answer
Answer:- d) All of the mentionedQ10) A named sequence of statements is known as which of the following?
a) method
b) function
c) turtle
d) module
View Answer
Answer:- b) functionQ11) What is a variable defined inside a function referred to as?
a) A local variable
b) An automatic variable
c) A volatile variable
d) A global variable
View Answer
Answer:- a) A local variableAlso See:- Function MCQ in Python – 3