➤ 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) What is a variable defined outside a function referred to as?
a) A global variable
b) A local variable
c) A static variable
d) An automatic variable
View Answer
Answer:- a) A global variableQ2) Which of the following items are present in the function header?
a) return value
b) function name
c) parameter list
d) Both function name and parameter list
View Answer
Answer:- d) Both function name and parameter listQ3) Does Lambda contains return statements?
a) False
b) True
View Answer
Answer:- a) FalseQ4) Lambda contains block of statements.
a) False
b) True
View Answer
Answer:- a) FalseQ5) Lambda is a statement.
a) True
b) False
View Answer
Answer:- b) FalseQ6) Which of the following function headers is correct?
a) def fun(x = 3, y = 5, z)
b) def fun(x = 3, y, z = 5)
c) def fun(x, y = 3, z = 5)
d) def fun(x, y, z = 5, i)
View Answer
Answer:- c) def fun(x, y = 3, z = 5)Q7) What is the output of the given below program?
def Hello():
print('Know Program')
Hello()
Hello()
a) Know Program
b) Hello
c)
Know Program
Know Program
d)
Hello
Hello
View Answer
Answer:- c)Know Program
Know Program
Q8) Find the output of the given Python program?
def f(a, b, c):
return a + b * c
x = f(5, 3, 5)
print(x)
a) 13
b) 15
c) 20
d) 25
View Answer
Answer:- c) 20Q9) What is the output of the given below program?
def cube(a):
return a * a * a
a = cube(5)
print(a)
a) 15
b) 25
c) 125
d) Error
View Answer
Answer:- c) 125Q10) What is the output of the given below program?
def printMax(x, y):
if x > y:
print(x)
elif x == y:
print('Equal')
else:
print(y)
printMax(5, 9)
a) 5
b) 9
c) Equal
d) None of these
View Answer
Answer:- b) 9Q11) Find the output of the given Python program?
def say(message, times = 1):
print(message * times)
say('Know ')
say('Program ', 3)
a) Know Program
b)
Know
Program
c)
Know
Program is printed 3 times.
d)
Know is printed 3 times.
Program is printed 3 times.
View Answer
Answer:- c)Know
Program is printed 3 times.
Also See:- Python Operators MCQ