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 the following code snippet?

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

2) ___ in Python is a counter-controlled loop.

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

>>> a={1,2,3}

>>> b=a.add(4)

>>> b

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

print('ab,12'.isalnum())

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

>>>list("a#b#c#d".split('#'))

6) A program that convert a high-level language program to a set of instructions that can run on a computer is called a

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

8) Which of the following declaration is incorrect?

9) Which of the following is an invalid statement in python.

10) Which of the following will run without errors?

11) In a Python program, a control structure:

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

print("Hello {name1} and {name2}".format(name1='foo', name2='bin'))

13) Find the invalid variable among the following:

14) The data type whose representation is known are called

15) The correct extension of the Python file is

16) What will be the output of the following Python expression if x=456?

print(“%-06d”%x)

17) The write method returns ________.

18) The GCD of the numbers 136 and 170 is ______ .

19) List structure in python where elements are stored in parenthesis.

20) What is testing process’ first goal ?

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

22) What is the extension of Python code File?

23) The complexity of linear search algorithm is

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

>>> a={5,6,7,8}

>>> b={7,8,9,10}

>>> len(a+b)

25) If we overcome the rules of the programming language, we get

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

27) which of the following is an escape sequence for a tab character

28) NumPY stands for. –

29) A detailed flowchart is know as

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

  a= [1, 2, 3, 4, 5]  for i in range(1, 5):      a[i-1] = a[i]  for i in range(0, 5):       print(a[i],end = " ")

31) The symbol used for conditional statement n a flow chart is a ____

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

print('11'.isnumeric())

33) The operator returns the quotent after division.

34) To convert the read value through input() into integer type, ______ () is used

35) Diamond shaped symbol is used in flowcharts to show the

36) Python code can run on a variety of platforms, it means Python is a _____ language.

37) If a={5,6,7,8}, which of the following statements is false?

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

  l1=[1,2,3]  l2=[4,5,6]  [x*y for x in l1 for y in l2]

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

  d = {0, 1, 2}  for x in d:      print(d.add(x))

40) Suppose list1 is [1, 3, 2], What is list1 * 2?

41) 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

42) Which symbol is used to write single line comment ?

43) What is the output of >>>float(‘12.6’)

44) (

What will be the output of the following Python code?

>>> a={5,4}  >>> b={1,2,4,5}  >>> a<b

 

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

46) If list1=[10,20,30], then operation list1*2 returns ____ .

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

48) A detailed flowchart is known as:

49) In Python, ________ is not supported.

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

x = ['ab', 'cd']
for i in x:
    i.upper() 
print(x)

51) Which of the following software translates source code into object code ?

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

53) If a=(1,2,3,4), a[1:-1] is _________

54) Which of the following is not a relational opeartor in Python?

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

  A = [[1, 2, 3],        [4, 5, 6],        [7, 8, 9]]  [A[row][1] for row in (0, 1, 2)]
56)

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

float(4+int(2.39)%2)

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

not(10<20) and not(10>30)

59) When an algorithm is written in the form of a programming language, it becomes a :

60)

61) Is the following Python code valid?

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

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

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

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

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

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

for i in a:

print (i, end=” “)

66) _____ function convert an integer to octal string in python.

67) If we not see the rules of th programming language, we get ?

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

print("abcdef".center(7, 1))

69) Output data screen

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

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

71) How many numbers will be printed by the following code?

def fun(a,b):
    for x in range(a,b+1):
        if x%3==0:
            print(x,end=" ")
fun(100,120)

72) What is the output of the following?

m=0
while m<5:
    m+=1
    if m==3:
        break
    else:
print(0)

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

  1. >>>example = "snow world"
  2. >>>example[3] = 's'
  3. >>>print example

 

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

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

76) The command is used to take input from the keyboard.


78) Which of the following is a feature of DocString?

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

print('for'.isidentifier())

80) The datatype whose representation is known are called

81) Which of the following is the use of function in python ?

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

print('ab'.isalpha())

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

s={1, 2, 3}

    s.update(4) 
s

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

print('my_string'.isidentifier())

85)

86) Testing is known as

87) How can we create on empty list in Python?

88) The operator used to calculate remainder after division.

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

90) Is the following Python code valid?

>>> a=2,3,4,5  >>> a

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

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

92) What is identity array?

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

94) In computer science, refers to a special method usable by a computer for the solution to a problem.

95)

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

  i = 0  while i < 3:      print(i)      i += 1  else:      print(0)

97) Which of the following is not true about an interpreter

98) In Python, a variable must be declared before it is assigned a value.

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

100) If we have two sets, s1 and s2, and we want to check if all the elements of s1 are present in s2 or not, we can use the function:

Your score is

You cannot copy content of this page