➤ 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) Is Python case sensitive when dealing with identifiers?
a) yes
b) no
c) machine dependent
d) none of the mentioned
View Answer
Answer:- a) yesThe case is always significant.
Q2) All keywords in Python are in __.
a) lower case
b) UPPER CASE
c) Capitalized
d) None of the mentioned
View Answer
Answer:- d) None of the mentionedTrue, False, and None are capitalized while the others are in lower case.
Q3) Which keyword is used for function?
a) Fun
b) Define
c) Def
d) Function
View Answer
Answer:- c) DefQ4) Python function always returns a value.
a) True
b) False
View Answer
Answer:- a) TrueIf you do not include any return statement in the Python function, it automatically returns None. So, a python function always returns a value.
Q5) Where is the function defined?
a) Module
b) Class
c) Another function
d) All of the mentioned
View Answer
Answer:- d) All of the mentionedQ6) What do we use to define a block of code in Python language?
a) Key
b) Brackets
c) Indentation
d) None of these
View Answer
Answer:- c) IndentationQ7) How is a function declared in Python?
a) def function function_name():
b) declare function function_name():
c) def function_name():
d) declare function_name():
View Answer
Answer:- c) def function_name():Q8) If the return statement is not used inside the function, the function will return:
a) None
b) 0
c) Null
d) Arbitrary value
View Answer
Answer:- a) NoneQ9) Which of the following is the use of the id() function in python?
a) Id() returns the size of the object.
b) Id() returns the identity of the object.
c) Both A and B
d) None of the above
View Answer
Answer:- b) Id() returns the identity of the object.Q10) Which of the following is the use of function in python?
a) Functions are reusable pieces of programs
b) Functions don’t provide better modularity for your application
c) you can’t also create your own functions
d) All of the mentioned
View Answer
Answer:- a) Functions are reusable pieces of programsQ11) You can also create your own functions, these functions are called?
a) py function
b) user-defined functions
c) built-in functions
d) None of the above
View Answer
Answer:- b) user-defined functionsAlso See:- MCQ on Python Functions – 2