Skip to content

Programming and Problem Solving through Python (M3-R5.1)- NIELIT O Level

  • by

You Have 2 hours To Complete The Test / Quiz


Programming and Problem Solving through Python (M3-R5.1)

Total available questions is More than 1000.

Each exam has 100 questions & Answers randomly.

You will get 2 hrs to complete the test.

Its Mandatory To Fill For Get Certificate After Complete Exam.

1) The ____ function takes two parameters, filename and mode.

2)

3) ndarray is also known as the ____ array.

4) What will be the output of the following Python code snippet?

  x = [i**+1 for i in range(3)]; print(x);

5) Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:

6) Which is Special type of literal in Python

7) In which datatype we can store True/False type values

8) What will be the output of the following Python code snippet?

z=set(‘abc’)

  z.add('san')  z.update(set(['p', 'q']))

z

9) The _____ function converts the specified value into a string.

10) Which of the following variable declaration is incorrect?

11) What will be the output of the following Python code?

print('*', "abcdef".center(7), '*')

 

12) Which of the following language is understood by computer ?

13) A graphical representation of a computer program in relation to its sequence of functions____ .

14) The Python prompt indicates that Interpreter is ready to accept instruction.

15) What will be the output of the following expression

16) What will be the output of the following Python expression?

24//6%3, 24//4//2

17) Which inbuilt function is used to takes an iterable object as input and makes them immutable.

18) Output data screen

19) What is the maximum possible length of an identifier?

20) Select the reserved keyword in python

21) In flowchart, parallelogram is used to show

22) Function range(3) will yield an iteratable sequence like

23) In Python assignment of more than one behaviour to a particular function and the operation performed varies by the types of objects or arguments involved are known as_____ .

24) Which of the following expressions results in an error?

25) in python a variable named ‘num’ ,which type of value we can store in this variable

26) What will be the output of the following Python code?

print("abc DEF".capitalize())

27) What will be the value of the following Python expression?

float(4+int(2.39)%2)

28) Which of the following data types is not supported in python

29) What will be the output of the following Python code?

print("ccdcddcd".find("c"))

30) The part of a machine level instruction, which tells the central processor what has to be done, is

31) Which of the following expressions is an example of type conversion?

32) What will be the output of the following Python code?

print("xyyzxyzxzxyy".endswith("xyy", 0, 2))

33) Which one of the following is the correct extension of the Python file-

34) Is the following Python code valid?

>>> a=(1,2,3)  >>> b=a.update(4,)

35) All keywords in python are in ____

36) Which function is used to converts and returns the binary equivalent string of a given integer.

37) What will be the output of the following Python code?

  i = 1  while True:      if i%0O7 == 0:          break      print(i)      i += 1

38) Which is/are the valid statement to print Hello Word in Python ?

39) If a={5,6,7}, what happens when a.add(5) is executed?

40) What will be the output of the following Python code?

= [5,5,6,7,7,7]

  b = set(a)  def test(lst):      if lst in b:          return 1      else:          return 0  for i in  filter(test, a):

print(i,end=” “)

41) What is the value of the expression 100 / 25 ?

42) Which of these is not a core data type ?

43) Which among the following list of operators has the highest precedence?

+, -, **, %, /, <<, >>, |

 

44) The ______ can be accessed only inside the function in which they are declared, whereas global variables can be accessed throughout the program body by all functions.

45) The method used to removes all the items at once.

46) Method is used to display entire contents of the file.

47) Kite/diamond symbol in flow chart is used for_______

48) What will be the output of the following Python code?

def power(x, y=2):
    r=1
    for i in range(y):
        r=r*x
    return r
print(power(3))
print(power(3,3))
(A)  212       32 (B) 9      27 (C) 567       98 (D) None of the above

49) If a is declared as a=[‘me’, ‘he’, ‘they’], the value of a=””.join(a) print(a) will be ______ .

50) What will be the result of the expression 15 and 10?

51) What will be the output of the following Python code?

  1. >>>example = "helle"
  2. >>>example.find("e")

52) A sequence of instruction, in a computer language, to get the desired result is known as _____ .

53) What will be the output of the following Python statement?

>>>"abcd"[2:]

54) Which of the following is not a legal integer type value in python.

55) Which of the following Python statements will result in the output: 6?

  A = [[1, 2, 3],       [4, 5, 6],       [7, 8, 9]]

56) Function range(10, 5, 2) will yield an iterable sequence like

57) ______ method parses the expression passed to it and runs python expression(code) within the program.

58) Which of the following is correct to Identify the right way to close a file.

59) Who developed Python ?

60) What will be the output of the following Python code?

>>> a={4,5,6}  >>> b={2,8,6}  >>> a-b

61) It refers to the ability of an application to run on different plateforms with or without minimal changes.

62) What is range() Funciton ?

63) What is called when a function is defined inside a class?

64) What will be the output of the following Python code snippet?

  x = 'abcd'  for i in range(len(x)):      x[i].upper()  print (x)

 

65) Which of the following is a floor division operator?

66) The write method returns ________.

67) To add a new element to a list we use which command?

68) What will be the output of the following pseudo code ?

Integer a
Set a =4
do
	print a + 2
      a = a-1
while (a not equals 0)
end while

69) When _____ gets executed, ‘inner PI value’ is printed as that is ‘pi’ value inside the function namespace.

70) What is unpickling ?

71) What will be the output of the following Python code?

print("abcdef".find("cd"))

72) ______ are the modes of both writing and reading in binary format in file.

73) Suppose list1 is [1, 5, 9], what is sum(list1)?

74) Which of the following is not an immutable type in Python ?

75) In order to store values in terms of key and value we use what core data type.

76) To retrieve the character at index 3 from string s=”Hello” what command do we execute (multiple answers allowed)?

77) are set of procedures defined in library to find the minimum value function or the root of an equation.

78) Which of the following statement is false about recursion:

79) The following symbol represent

80) Algorithms cannot be represented by____

81) A function used for writing data in the binary format:

82) What will be the output of the following Python code?

  x = (i for i in range(3))  for i in x:      print(i)  for i in x:      print(i)

83) Which of the following executes the programming code line by line?

84) Suppose t=(1,2,4,3), which of the following is incorrect?

85) What will be the output of the following Python statement?

>>>chr(ord('A'))

86) What will be the output of the following Python code snippet?

print('\t'.isspace())

87) What will be the output of the following Python code?

list1 = [11, 2, 23]
list2 = [11, 2, 2]

88) The program must be able to handle unexpected situation like wrong input or no input.

89) What will be the output of the following Python code?

>>>max("what are you")

90) By using function _____ ,we can change the shape of the Numpy array in python.

91) Can we write if / else into one line in python?

92) A natural number 1 is also an ____ .

93) What will be the output of the following Python code?

  x = 'abcd'  for i in range(len(x)):      print(i.upper())

94) What is testing process’ first goal ?

95)

96) What is the extension of Python code File?

97) What will be the output of the following expression ?

x =4
print(x<<2)

 

98) Which of the following is not a legal integer type value in Python

99) A loop block in python starts with a.. -

100) Which of the following functions converts a string to a float in python ?

Your score is

You cannot copy content of this page