Python Exam

cedti4
cedti5
cedti3
cedti6
cedti1
cedti4 cedti5 cedti3 cedti6 cedti1

Welcome Online Computer Education Assessment Portal

Basic Instructions for Online Examinations:

  1. The examination will comprise of Objective type Multiple Choice Questions (MCQs)
  2. All questions are compulsory and each carries two marks.
  3. The total number of questions is 40 and Duration of examination, is 2 Hrs.
  4. There will be NO NEGATIVE MARKING for the wrong answers.
  5. The examination does not require using any paper, pen, pencil and calculator.
  6. Every student will take the examination on a Laptop/Desktop/Smart Phone.
  7. Use Full Screen Before the Click Start Button.


0%
1 votes, 5 avg
24

Dear Student Before Start Examination Click Above Square Button 

 


Python

Fill The Detail Before Start The Examination

1 / 40

What does pip stand for python?

2 / 40

What will be the output of the following Python code snippet if x=1?

x<<2

 

3 / 40

What will be the output of the following Python function?

len(["hello",2, 4, 6])

 

4 / 40

Which of the following functions is a built-in function in python?

5 / 40

What will be the output of the following Python statement?

  1. >>>"a"+"bc"

 

6 / 40

Is Python case sensitive when dealing with identifiers?

7 / 40

Which function is called when the following Python program is executed?

f = foo()
format(f)

8 / 40

What will be the output of the following Python program?

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

 

9 / 40

What are the values of the following Python expressions?

 2**(3**2)
 (2**3)**2
 2**3**2

 

10 / 40

What will be the output of the following Python code?

print("abc. DEF".capitalize())

 

11 / 40

Which of the following character is used to give single-line comments in Python?

12 / 40

Which of the following is the correct extension of the Python file?

13 / 40

Which one of the following is not a keyword in Python language?

14 / 40

Is Python code compiled or interpreted?

15 / 40

Who developed Python Programming Language?

16 / 40

What will be the value of the following Python expression?

4 + 3 % 5

 

17 / 40

Which module in the python standard library parses options received from the command line?

18 / 40

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

for i in [1, 2, 3, 4][::-1]:
    print(i, end=' ')

 

19 / 40

Which of the following is used to define a block of code in Python language?

20 / 40

What will be the output of the following Python code?

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

 

21 / 40

Which of the following is the truncation division operator in Python?

22 / 40

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


23 / 40

What is the order of namespaces in which Python looks for an identifier?

24 / 40

Which keyword is used for function in Python language?

25 / 40

What will be the output of the following Python code?

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


                            

26 / 40

Which of these is the definition for packages in Python?

27 / 40

What arithmetic operators cannot be used with strings in Python?

28 / 40

Python supports the creation of anonymous functions at runtime, using a construct called __________

29 / 40

Which of the following is the use of id() function in python?

30 / 40

What will be the output of the following Python function?

min(max(False,-3,-4), 2,7)

31 / 40

Which type of Programming does Python support?

32 / 40

Which of the following functions can help us to find the version of python that we are currently working on?

33 / 40

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

print("%.2f"%x)

 

34 / 40

What is the order of precedence in python?

35 / 40

What will be the output of the following Python code?

  1. class tester:
  2.     def __init__(self, id):
  3.         self.id = str(id)
  4.         id="224"
  5. 
    
  6. >>>temp = tester(12)
  7. >>>print(temp.id)

 

36 / 40

All keywords in Python are in _________

37 / 40

Which of the following is true for variable names in Python?

38 / 40

Which of the following is not a core data type in Python programming?

39 / 40

The following python program can work with ____ parameters.

def f(x):
    def f1(*args, **kwargs):
           print("Sanfoundry")
           return x(*args, **kwargs)
    return f1

40 / 40

What will be the output of the following Python code?

l=[1, 0, 2, 0, 'hello', '', []]
list(filter(bool, l))
0%

Please rate this Exam