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) What will be the output of following statement ?

>>>"m"+"nl"

2) The word comes from the name of a Persian mathematician Abu Ja’far Mohammed ibn-i Musa al Khowarizmi is called?

3) What is identity array?

4) Find the last element of list in Python? Assume ‘bikes’ is the name of list.

5) Which of the following refers to mathematical function ?

import numpy as np

ary = np.array([1,2,3,5,8])

ary = ary + 1

print (ary[1])

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

string = "my name is x"  for i in string:      print (i, end=", ")

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

def m(list):
    v = list[0]
    for e in list:
        if v < e:
            v = e
    return v
   
values = [[3, 4, 5, 1], [33, 6, 1, 2]]   
for row in values: 
      print(m(row), end = " ")

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

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

9) Error does not fall into any category

10) Set of statements is executed again and again based upon conditional test.

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

a=[13,56,17]
a.append([87])
a.extend([45,67])
print(a)

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

data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
def ttt(m):
    v = m[0][0]
    for row in m:
        for element in row:
            if v < element: v = element     
        return v
print(ttt(data[0]))

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

a = { 1 : "A", 2 : "B", 3 : "C" }

for i in a:

print (i, end=" ")

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

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

15) Connectors used to connect flowchart symbols to each other are classified as.

16)

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

print([[i+j for i in "abc"] for j in "def"])

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

  x = 2  for i in range(x):      x -= 2      print (x)

19) What will be the output of the following Python statement?(python 3.xx)

  1. >>>print(format("Welcome", "10s"), end = '#')
  2. >>>print(format(111, "4d"), end = '#')
  3. >>>print(format(924.656, "3.2f"))

20) A natural number 1 is also an ____ .

21) Is it safe to directly use the == operator to determine whether objects of type float are equal ?

22) Algorithms cannot be represented by

23) What is the output of the following code?

list1=[2, 33, 222, 14, 25]
print(list1[ : -1 ])

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

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

print('HelloWorld'.istitle())

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

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

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

28) Which of the following precedence order is correct in Python?

29) What will be the value of X in the following Python expression?

X = 2+9*((3*12)-8)/10

31) Function range(0, 5, 2) will yield on iterable sequence like

32) If a is declared as a=['me', 'he', 'they'], the value of a="".join(a) print(a) will be ______ .

33)

34) What is the output of print(k) in the following Python code snippet?

  k = [print(i) for i in my_string if i not in "aeiou"]  print(k)

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

36) What is the symbol used to represent start and stop of a flowchart ?

37) Which of the following will give error ?

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

39) Which of the following is the basic I/O connections in file?

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

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

print("xyyzxyzxzxyy".count('yy', 1))

42) What will be the output of the following Python expression if x=56.236?

print("%.2f"%x)

43) What will be the output of the following pseudocode, where ^ represent XOR operation ?

Integer a, b, c
set b = 4, a = 3
c =a ^ b
Print c

 

44) The _____ statement is used for exiting from the loop.

45) Output data screen

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

  i = 2  while True:      if i%3 == 0:          break      print(i)      i += 2

47) The ________ function is used to convert a string value to int.

48) Users write the programs in which language?

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

{a**2 for a in range(4)}

50) Every function has an implicit statement _____ as the last instruction in the function body.

51) Which of the following python function converts a string to a list.

52) ____ help to check the data type of an array-

53) Is the following Python code valid?

>>> a=(1,2,3,4)  >>> del a

54) The process of finding errors in code is called as

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

  s=["pune", "mumbai", "delhi"]  [(w.upper(), len(w)) for w in s]

56) What is the output of >>>float('12.6')

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

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

58) Row data assigned to a variable is called as.

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

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

  my_string = "hello world"  k = [(i.upper(), len(i)) for i in my_string]  print(k)

61) ____ an explicit set of step by step specific instructions that solve a problem with an end or a solution

62) Which of the following statements is used to create an empty set?

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

matrix = [[1, 2, 3, 4],
         [4, 5, 6, 7],
         [8, 9, 10, 11],
         [12, 13, 14, 15]]  
for i in range(0, 4):
      print(matrix[i][1], end = " ")

64) The functions which are coming with Python software automatically are called ____ .

65) The ____ function is used to convert a string value to int.


68) Which of these are keyword?

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

print('0xa'.isdigit())


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

  x = "abcdef"  i = "a"  while i in x[1:]:      print(i, end = " ")

 

72) What will be the output of the following code snippet?

a = 2.19
b=3.999999
C= -3.30
printint((a), floor(b), ceil(c), fabs(c))

73) Which of the following cannot be a variable ?

74)

75) In which language is Python written?

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

def f(values):
    values[0] = 44
   
v = [1, 2, 3]
f(v)
print(v)

77) Set of statements is executed based upon conditional test.

78) Suppose i is 5 and j is 4, i + j is same as ________

79) elif can be considered to be abbreviation of

80) Every function has an implicit statement _____ as the last instruction in the function body.

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

print('a@ 1,'.islower())

82) Which of the following statement is correct about Getcwd() .

83) The scope rule in Python are summarized as____.

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

  1.   numberGames = {}
  2.   numberGames[(1,2,4)] = 8
  3.   numberGames[(4,2,1)] = 10
  4.   numberGames[(1,2)] = 12
  5.   sum = 0
  6. for k in numberGames:
  7.       sum += numberGames[k]
  8.   print len(numberGames) + sum

85) Which one of the following is a valid Python if statement:

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

print('Hello!2@#World'.istitle())

 

87) Which Python built in function returns the unique number assigned to an object?

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

>>> a=(2,3,4)  >>> sum(a,3)

89) Is the following Python code valid?

    a={3,4,{7,5}}  print(a[2][0])

90) Python code can run on variety of plateforms, it means Python is a _____language.

91) The order of statement execution in the form of top to bottom, is known as .......... construct.

92) An algorithm that calls itself directly or indirectly is known as

93) The function that yields current position in the file

94)

95) An algorithm is best describe as

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

97)

98) Which module is to be imported for using randint() function?

99) Which one of these is floor division?

100)

Your score is

You cannot copy content of this page