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) ……….design approach starts by dividing the complex algorithm into one or more modules.

2) Which type of Programming does Python support?

3) The for loop in Python is an ____ .

4) _____ is also known as the alias array.

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

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

7) In which language is Python written?

8) What value does the following expression evaluate to ?

print(5 + 8 * ((3*5)-9)/10)

9) Python is a/an _________ language.

10) To which of the following the “in” operator can be used to check if an item is in it ?

11) 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]
12)

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

  l=[[1, 2, 3], [4, 5, 6]]  for i in range(len(l)):  	for j in range(len(l[i])):  		l[i][j]+=10  l

14) Which of the following environment variable for Python tells the Python interpreter where to locate the module files imported into a program ?

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

16) What is identity array?

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

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

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

>>> b=a.add(4)

>>> b

19) What will be the output of the following python code?

from math import *
 floor(11.7)

20) The operator used for concatenating two strings. –

21) Which of the following is not a valid keyword of Python associated with loops?

22) What will be the output of the following Python expression if x=22.19?

print(“%5.2f”%x)

23) How many keywords are there in python 3.7?

24) In Python, a variable may be assigned a value of one type, and then later assigned a value of a different type. This concept is known as

25) In which year was the Python language developed?

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

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

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

28) In which year was the Python 3.0 version developed?

29)

30) The scope rule in Python are summarized as____.

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

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

32) In python we can change the value of variable

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

34) Write a list comprehension to produce the list: [1, 2, 4, 8, 16……212].

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

print('my_string'.isidentifier())

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

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

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

38) Which of the following is the same as list(map(lambda x: x**-1, [1, 2, 3]))?

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

40) Empty list indicated by which symbol.

41) range(3) in Python is equivalent to:

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

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

lst=[3,4,6,1,2]
lst[1:2]=[7,8]
print(lst)

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

45) Which of the following variable declaration is incorrect?

46) Data structure used in recursion.

47) The output of this code is ______ .

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

s={4>3, 0, 33}

all(s)

any(s)

49) What will be the output of the following algorithm for a=5, b-8, c=6 ?

Step 1: Start
Step 2: Declare variables a, b and c.
Step 3 Read variables a, b and c.
Step 4: If a < b
If a 

50) Which term describes a loop that continues repeating without a terminating (ending) condition ?

51) Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)?

52) ______ valid attribute of a file object (fp) ?

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

    r = [11, 12, 13, 14, 15, 16, 17, 18, 19]  A = [[0, 10, 20],

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

bool(‘False’)

bool()

55) _____ help programmers to create lists in a concise way.

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

57) The error that can be pointed out by the compiler are

58) Which one of these is floor division?

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

60) 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.

61) What will be the output of the following Python code snipped if x = 1?

x<<2

62) ____ operator repeats a list for the given number of items.

63) Strings in Python are _____

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

integer a,b
set a=9,b=5
a=a mod(a-3)
b=b mod(b-3)
print a+b

65) 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_____ .

66)

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

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

>>> a.intersection_update({2,3,4,5})

>>> a

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

z=set('abc')

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

z

69) 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:

70) The datatype whose representation is known are called

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) _______ is latest high level language.

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

  a = [0, 1, 2, 3]  for a[0] in a:      print(a[0])

74) Which of the following is not a logical operator?

75) Is Python case sensitive when dealing with identifiers?

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

print("%-06d"%x)

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

78) The operator returns the quotent after division.

79) Which of the following commands will create a list?

80) Python converts the source code into an intermediate form called _______.

81) The following symbol represent

82) What is identity array?

83) Which one of the following has the highest precedence in the expression?

84) A detailed flowchart is know as

85) ____ statement used for error checking. -

86) What will be the output of following statement ?

>>>"m"+"nl"

87) _______ are user Define name

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

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

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

>>> b=frozenset([3,4,5])

>>> a-b

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

91) What is the list comprehension equivalent for: list(map(lambda x:x**-1, [1, 2, 3]))?

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

print('for'.isidentifier())

93) A sentinel-controlled loop can be implemented using _____

94) Which of these about a frozenset is not true?

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

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

96)

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

98) will return the mathematical number PI from the constants module.

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

100) The ______ statement lets the program go through the piece of code without performing any action.

Your score is

You cannot copy content of this page