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

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

2 / 40

What will be the output of the following Python program?

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

 

3 / 40

What does pip stand for python?

4 / 40

What will be the output of the following Python function?

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

 

5 / 40

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

6 / 40

What are the values of the following Python expressions?

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

 

7 / 40

What will be the output of the following Python code?

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

 

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

 

9 / 40

What will be the output of the following Python code?

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


                            

10 / 40

Which of these is the definition for packages in Python?

11 / 40

Who developed Python Programming Language?

12 / 40

Which type of Programming does Python support?

13 / 40

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

14 / 40

What will be the value of the following Python expression?

4 + 3 % 5

 

15 / 40

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

16 / 40

The following python program can work with ____ parameters.

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

17 / 40

What will be the output of the following Python code?

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

18 / 40

Which keyword is used for function in Python language?

19 / 40

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

20 / 40

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

21 / 40

What arithmetic operators cannot be used with strings in Python?

22 / 40

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

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

 

23 / 40

Is Python case sensitive when dealing with identifiers?

24 / 40

What is the order of precedence in python?

25 / 40

What will be the output of the following Python code?

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

 

26 / 40

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

print("%.2f"%x)

 

27 / 40

Is Python code compiled or interpreted?

28 / 40

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

29 / 40

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

30 / 40

What will be the output of the following Python function?

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

31 / 40

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

32 / 40

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

33 / 40

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

34 / 40

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

35 / 40

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

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


37 / 40

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

x<<2

 

38 / 40

All keywords in Python are in _________

39 / 40

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

f = foo()
format(f)

40 / 40

What will be the output of the following Python statement?

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

 

0%

Please rate this Exam