Q.278.What is the order of precedence in Python?
Q.278.What is the order of precedence in Python?
-
-
-
-
Q.215The output of bool(‘False’) will return
Q.215The output of bool(‘False’) will return
Q.214.The output of bool(‘’) will return
Q.214.The output of bool(‘’) will return
Q.213.The abs function returns the
Q.213.The abs function returns the
Q.212.The variable which is defined outside the function is called
Q.212.The variable which is defined outside the function is called
Q.211.The variable which is defined inside a function is called
Q.211.The variable which is defined inside a function is called
Q.210.A function can be executed automatically without calling it
Q.210.A function can be executed automatically without calling it
Q.209.The function, which is defined under a class, is called
Q.209.The function, which is defined under a class, is called
Q.208.Functions are coming under two categories:
Q.208.Functions are coming under two categories:
Q.207.A function header consists of
Q.207.A function header consists of
Q.206.The keyword we used to define a function is:
Q.206.The keyword we used to define a function is:
Q.216.
For the given program
def mul(x):
print(3*x)
if we call the function like mul(“ Hello”) the output should be
Q.216.
For the given program
def mul(x):
print(3*x)
if we call the function like mul(“ Hello”) the output should be
Q.217.Parameters of a function can be defined
Q.217.Parameters of a function can be defined
Q.218.The output of int(False) should be
Q.218.The output of int(False) should be
Q.277.. Is Python code compiled or interpreted?
Q.277.. Is Python code compiled or interpreted?
Q.227.If List=[‘A’,5,6,’C’,8,’L’,’C’,’N’] the method to print every even-index element from the list is
Q.227.If List=[‘A’,5,6,’C’,8,’L’,’C’,’N’] the method to print every even-index element from the list is
Q.226.If List=[‘A’,5,6,’C’,8,’L’,’C’,’N’] then the method to extract[‘A’,5,6,’C’] from the list is
Q.226.If List=[‘A’,5,6,’C’,8,’L’,’C’,’N’] then the method to extract[‘A’,5,6,’C’] from the list is
Q.225.The method to extract the last element of a list is
Q.225.The method to extract the last element of a list is
Q.224.Elements of a list are
Q.224.Elements of a list are
Q.224.If return statement is not used inside the function, the function will return
Q.224.If return statement is not used inside the function, the function will return
Q.223.What is a recursive function?
Q.223.What is a recursive function?
Q.222.You can also create your own functions, these functions are called
Q.222.You can also create your own functions, these functions are called
Q.220.Which one of the following is the correct way of calling a function
Q.220.Which one of the following is the correct way of calling a function
Q.219.
For the given program
def add(num1=2,num2=3):
return num1+num2
If we call the function as add(4) the output should be
Q.219.
For the given program
def add(num1=2,num2=3):
return num1+num2
If we call the function as add(4) the output should be
Q.205.What is the purpose of the global keyword in Python?
Q.205.What is the purpose of the global keyword in Python?
Q.204. Which keyword can be used to handle an exception in Python?
Q.204. Which keyword can be used to handle an exception in Python?
Q.188.Which keyword is used to define a class in Python?
Q.188.Which keyword is used to define a class in Python?
Q.187. What is the purpose of the ord() function in Python?
Q.187. What is the purpose of the ord() function in Python?
Q.186.. Which of the following is NOT a valid Python string method?
Q.186.. Which of the following is NOT a valid Python string method?
Q.185. What is the purpose of the eval() function in Python?
Q.185. What is the purpose of the eval() function in Python?
Q.184. What is the purpose of the time module in Python?
Q.184. What is the purpose of the time module in Python?
Q.183. Which of the following is used to define a tuple comprehension in Python?
Q.183. Which of the following is used to define a tuple comprehension in Python?
Q.182.What is the purpose of the split() method in Python strings?
Q.182.What is the purpose of the split() method in Python strings?
Q.180.Which keyword is used to handle exceptions in Python?
Q.180.Which keyword is used to handle exceptions in Python?
Q.179. What is the purpose of the str() function in Python?
Q.179. What is the purpose of the str() function in Python?
Q.178.. Which of the following is NOT a valid Python list method?
Q.178.. Which of the following is NOT a valid Python list method?
Q.189. What is the purpose of the json module in Python?
Q.189. What is the purpose of the json module in Python?
Q.190. Which of the following is used to convert a string to lowercase in Python?
Q.190. Which of the following is used to convert a string to lowercase in Python?
Q.191. What is the purpose of the logging module in Python?
Q.191. What is the purpose of the logging module in Python?
Q203.Which string method removes white spaces from both the beginning and the end?
Q203.Which string method removes white spaces from both the beginning and the end?
Q.202. Which method checks if the string starts with a particular substring?
Q.202. Which method checks if the string starts with a particular substring?
Q.201. Which of the following creates a new reference to the same list?
Q.201. Which of the following creates a new reference to the same list?
Q.200.Which of the following is true for variables in Python?
Q.200.Which of the following is true for variables in Python?
Q.199.Which method is used to remove all items from a dictionary?
Q.199.Which method is used to remove all items from a dictionary?
Q.198.Which method returns a list of all the values in the dictionary?
Q.198.Which method returns a list of all the values in the dictionary?
Q.197. What is the output of 5 // 2?
Q.197. What is the output of 5 // 2?
Q.196. Which of the following is used to check if a key exists in a Python dictionary?
Q.196. Which of the following is used to check if a key exists in a Python dictionary?
Q.194. What is the purpose of the zip() function in Python?
Q.194. What is the purpose of the zip() function in Python?
Q.193.Which operator is used for exponentiation in Python?
Q.193.Which operator is used for exponentiation in Python?
Q.177.What is the purpose of the map() function in Python?
Q.177.What is the purpose of the map() function in Python?