Q.107. Which keyword is used to exit a loop prematurely in Python?
Q.107. Which keyword is used to exit a loop prematurely in Python?
Q.92.Which of these creates an empty dictionary?
Q.92.Which of these creates an empty dictionary?
Q.91.Which operator is used for exponentiation?
Q.91.Which operator is used for exponentiation?
Q.90.Which operator is used for floor division?
Q.90.Which operator is used for floor division?
Q.89. What does a function without a return statement return?
Q.89. What does a function without a return statement return?
Q.88.Which keyword is used to define a function?
Q.88.Which keyword is used to define a function?
Q.87.How to add an element to the end of a list?
Q.87.How to add an element to the end of a list?
Q.86. What is the result of list(“Python”)?
Q.86. What is the result of list(“Python”)?
-
-
-
-
Q.85.Which exception is raised when dividing by zero in Python?
Q.85.Which exception is raised when dividing by zero in Python?
Q.84.Which block is executed no matter if an exception occurs or not?
Q.84.Which block is executed no matter if an exception occurs or not?
Q.83.Which method is used to replace parts of a string?
Q.83.Which method is used to replace parts of a string?
Q.93.How to access the value for the key “apple” in a dictionary d?
Q.93.How to access the value for the key “apple” in a dictionary d?
Q.94. Which of the following can be a valid variable name in Python?
Q.94. Which of the following can be a valid variable name in Python?
Q.95. Which of the following is NOT a valid Python data type?
Q.95. Which of the following is NOT a valid Python data type?
Q.106.What is the purpose of the random
module in Python?
Q.106.What is the purpose of the random
module in Python?
Q.105. Which of the following is NOT a valid Python conditional statement?
Q.105. Which of the following is NOT a valid Python conditional statement?
Q.104. What is the purpose of the split()
method in Python strings?
Q.104. What is the purpose of the split()
method in Python strings?
Q.103. What is the purpose of the range()
function in Python?
Q.103. What is the purpose of the range()
function in Python?
Q.102. Which of the following is used to define a comment in Python?
Q.102. Which of the following is used to define a comment in Python?
Q.101.What is the purpose of the append()
method in Python lists?
Q.101.What is the purpose of the append()
method in Python lists?
Q.100.Which of the following is NOT a valid Python loop statement
Q.100.Which of the following is NOT a valid Python loop statement
Q.99. What is the purpose of the if
statement in Python?
Q.99. What is the purpose of the if
statement in Python?
Q.97. Which of the following is used to define a function in Python?
Q.97. Which of the following is used to define a function in Python?
Q.96.What is the purpose of the len()
function in Python?
Q.96.What is the purpose of the len()
function in Python?
Q.82.What is the output of “Python”.lower()?
Q.82.What is the output of “Python”.lower()?
Q.81.Which of these is mutable?
Q.81.Which of these is mutable?
Q.67.
Which of these data types does Python not natively support?
Q.67.
Which of these data types does Python not natively support?
Q.66.Python is a:
Q.66.Python is a:
Q.65.
Which of the following is a valid Python comment?
Q.65.
Which of the following is a valid Python comment?
Q.64.
Which version of Python removed the print statement?
Q.64.
Which version of Python removed the print statement?
Q.63.
Python is known as:
Q.63.
Python is known as:
Q.62.
. What will be the output of the following Python code?
def foo():
try:
return 1
finally:
return 2
k = foo()
print(k)
Q.62.
. What will be the output of the following Python code?
def foo():
try:
return 1
finally:
return 2
k = foo()
print(k)
Q.60. What will be the output of the following Python code?
x = [[0], [1]]
print((' '.join(list(map(str, x))),))
Q.60. What will be the output of the following Python code?
x = [[0], [1]]
print((' '.join(list(map(str, x))),))
Q.59. Which of the following is the use of id() function in python?
Q.59. Which of the following is the use of id() function in python?
Q.58. What is output of print(math.pow(3, 2))?
Q.58. What is output of print(math.pow(3, 2))?
Q.
57. What will be the output of the following Python code?
print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))
Q.
57. What will be the output of the following Python code?
print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))
Q.68.
Which of the following is a mutable data type in Python?
Q.68.
Which of the following is a mutable data type in Python?
Q.69.What data type would you use to store a whole number in Python?
Q.69.What data type would you use to store a whole number in Python?
Q.70.
Which of the following is not a Python built-in data type?
Q.70.
Which of the following is not a Python built-in data type?
Q.80. Which mode is used for binary reading in Python?
Q.80. Which mode is used for binary reading in Python?
Q.79.Which function opens a file for reading in Python?
Q.79.Which function opens a file for reading in Python?
Q.78.Which is used for private data members in Python?
Q.78.Which is used for private data members in Python?
Q.77. Which is used to create an object in Python?
Q.77. Which is used to create an object in Python?
Q.76. Which is not an OOP principle?
Q.76. Which is not an OOP principle?
Q.75.What do we use to define a block of code in Python language?
Q.75.What do we use to define a block of code in Python language?
Q.74.Which one of the following is the correct extension of the Python file?
Q.74.Which one of the following is the correct extension of the Python file?
Q.73. In which programming language, Python was written?
Q.73. In which programming language, Python was written?
Q.72.Who developed the Python language?
Q.72.Who developed the Python language?
Q,71.. Which company developed the Python programming language?
Q,71.. Which company developed the Python programming language?
Q.56. Which of the following is a feature of Python DocString?
Q.56. Which of the following is a feature of Python DocString?