Q.54. What will be the output of the following Python code snippet?
z=set('abc$de')
'a' in z
Q.54. What will be the output of the following Python code snippet?
z=set('abc$de')
'a' in z
Q.40. What will be the output of the following Python code?
print("abc. DEF".capitalize())
Q.40. What will be the output of the following Python code?
print("abc. DEF".capitalize())
38. What will be the output of the following Python program?
z=set('abc')
z.add('san')
z.update(set(['p', 'q']))
z
38. What will be the output of the following Python program?
z=set('abc')
z.add('san')
z.update(set(['p', 'q']))
z
-
-
-
-
.Q.37. Which module in the python standard library parses options received from the command line?
.Q.37. Which module in the python standard library parses options received from the command line?
Q.36.
What will be the output of the following Python program?
def foo(x):
x[0] = ['def']
x[1] = ['abc']
return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))
Q.36.
What will be the output of the following Python program?
def foo(x):
x[0] = ['def']
x[1] = ['abc']
return id(x)
q = ['abc', 'def']
print(id(q) == foo(q))
Q.33.
What will be the output of the following Python code?
-
class tester:
-
def __init__(self, id):
-
self.id = str(id)
-
id="224"
-
-
>>>temp = tester(12)
-
>>>print(temp.id)
Q.33.
What will be the output of the following Python code?
-
class tester:
-
def __init__(self, id):
-
self.id = str(id)
-
id="224"
-
-
>>>temp = tester(12)
-
>>>print(temp.id)
Q.34.Which one of the following is not a keyword in Python language?
Q.34.Which one of the following is not a keyword in Python language?
Q.33.Which function is called when the following Python program is executed?
f = foo()
format(f)
Q.33.Which function is called when the following Python program is executed?
f = foo()
format(f)
Q.32.What will be the output of the following Python statement?
-
>>>"a"+"bc"
Q.32.What will be the output of the following Python statement?
-
>>>"a"+"bc"
Q.31. What will be the output of the following Python code snippet?
for i in [1, 2, 3, 4][::-1]:
print(i, end=' ')
Q.31. What will be the output of the following Python code snippet?
for i in [1, 2, 3, 4][::-1]:
print(i, end=' ')
Q.30. What is the order of namespaces in which Python looks for an identifier?
Q.30. What is the order of namespaces in which Python looks for an identifier?
Q.41. Which of the following statements is used to create an empty set in Python?
Q.41. Which of the following statements is used to create an empty set in Python?
Q.42. What will be the value of ‘result’ in following Python program?
list1 = [1,2,3,4]
list2 = [2,4,5,6]
list3 = [2,6,7,8]
result = list()
result.extend(i for i in list1 if i not in (list2+list3) and i not in result)
result.extend(i for i in list2 if i not in (list1+list3) and i not in result)
result.extend(i for i in list3 if i not in (list1+list2) and i not in re
Q.42. What will be the value of ‘result’ in following Python program?
list1 = [1,2,3,4]
list2 = [2,4,5,6]
list3 = [2,6,7,8]
result = list()
result.extend(i for i in list1 if i not in (list2+list3) and i not in result)
result.extend(i for i in list2 if i not in (list1+list3) and i not in result)
result.extend(i for i in list3 if i not in (list1+list2) and i not in re
-
-
-
-
Q.43. To add a new element to a list we use which Python command?
Q.43. To add a new element to a list we use which Python command?
Q.53. Which of the following is a Python tuple?
Q.53. Which of the following is a Python tuple?
Q.52. What will be the output of the following Python program?
-
def addItem(listParam):
-
listParam += [1]
-
-
mylist = [1, 2, 3, 4]
-
addItem(mylist)
-
print(len(mylist))
Q.52. What will be the output of the following Python program?
-
def addItem(listParam):
-
listParam += [1]
-
-
mylist = [1, 2, 3, 4]
-
addItem(mylist)
-
print(len(mylist))
Q.51. What are the two main types of functions in Python?
Q.51. What are the two main types of functions in Python?
Q.50. What will be the output of the following Python code?
x = 'abcd'
for i in range(len(x)):
print(i)
Q.50. What will be the output of the following Python code?
x = 'abcd'
for i in range(len(x)):
print(i)
Q.49. What will be the output of the following Python program?
i = 0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)
Q.49. What will be the output of the following Python program?
i = 0
while i < 5:
print(i)
i += 1
if i == 3:
break
else:
print(0)
Q.48. What is the maximum possible length of an identifier in Python?
Q.48. What is the maximum possible length of an identifier in Python?
47. Which of the following Python statements will result in the output: 6?
A = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
47. Which of the following Python statements will result in the output: 6?
A = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
Q.46. Which one of the following is the use of function in python?
Q.46. Which one of the following is the use of function in python?
45. What will be the output of the following Python code?
-
>>>list1 = [1, 3]
-
>>>list2 = list1
-
>>>list1[0] = 4
-
>>>print(list2)
45. What will be the output of the following Python code?
-
>>>list1 = [1, 3]
-
>>>list2 = list1
-
>>>list1[0] = 4
-
>>>print(list2)
Q.44. What will be the output of the following Python code?
print('*', "abcde".center(6), '*', sep='')
Q.44. What will be the output of the following Python code?
print('*', "abcde".center(6), '*', sep='')
Q.29.What will be the output of the following Python code?
x = 'abcd'
for i in x:
print(i.upper())
Q.29.What will be the output of the following Python code?
x = 'abcd'
for i in x:
print(i.upper())
Q.28What will be the output of the following Python function?.
Q.28What will be the output of the following Python function?.
Q.12.Which of the following functions can help us to find the version of python that we are currently working on?
Q.12.Which of the following functions can help us to find the version of python that we are currently working on?
Q.11.What will be the output of the following Python code?
Q.11.What will be the output of the following Python code?
Q.10. Which of the following character is used to give single-line comments in Python?
Q.10. Which of the following character is used to give single-line comments in Python?
Q.09.Which keyword is used for function in Python language?
Q.09.Which keyword is used for function in Python language?
Q.08.Which of the following is used to define a block of code in Python language?
Q.08.Which of the following is used to define a block of code in Python language?
Q.07.
What will be the value of the following Python expression?
4 + 3 % 5
Q.07.
What will be the value of the following Python expression?
4 + 3 % 5
Q.06. All keywords in Python are in _________
Q.06. All keywords in Python are in _________
Q.05.Is Python code compiled or interpreted?
Q.05.Is Python code compiled or interpreted?
Q.03. Is Python case sensitive when dealing with identifiers?
Q.03. Is Python case sensitive when dealing with identifiers?
Q.02. Which type of Programming does Python support?
Q.02. Which type of Programming does Python support?
Q.13. Python supports the creation of anonymous functions at runtime, using a construct called __________
Q.13. Python supports the creation of anonymous functions at runtime, using a construct called __________
Q.14.What is the order of precedence in python?
Q.14.What is the order of precedence in python?
-
-
-
-
Q.17. What will be the output of the following Python code snippet if x=1?
Q.17. What will be the output of the following Python code snippet if x=1?
Q.27.Which of these is the definition for packages in Python?
Q.27.Which of these is the definition for packages in Python?
Q.26. What will be the output of the following Python expression if x=56.236?
Q.26. What will be the output of the following Python expression if x=56.236?
Q.25. Which of the following is not a core data type in Python programming?
Q.25. Which of the following is not a core data type in Python programming?
Q.23. What will be the output of the following Python function?
min(max(False,-3,-4), 2,7)
Q.23. What will be the output of the following Python function?
min(max(False,-3,-4), 2,7)
Q.22. Which of the following is the use of id() function in python?
Q.22. Which of the following is the use of id() function in python?
Q.21.Which of the following functions is a built-in function in python
Q.21.Which of the following functions is a built-in function in python
Q.20. What will be the output of the following Python code?
Q.20. What will be the output of the following Python code?
-
-
-
-
Q.19.Which of the following is the truncation division operator in Python?
Q.19.Which of the following is the truncation division operator in Python?
Q.17.Which of the following is true for variable names in Python?
Q.17.Which of the following is true for variable names in Python?
Q.18.What does pip stand for python?
Q.18.What does pip stand for python?
Q.01.Who developed Python Programming Language?
Q.01.Who developed Python Programming Language?