Search Header Logo

Python (BCS-DS-427B)

Authored by Akshat Kaushik

Engineering

University

Used 1+ times

Python (BCS-DS-427B)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to declare a list in Python?

list_name = {element1, element2, element3}
list_name = [element1, element2, element3]
list_name : [element1, element2, element3]
list_name = (element1, element2, element3)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type in Python is immutable?

list
set
dictionary
tuple

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the __init__ method in a Python class do?

a) Initializes class variables

b) Serves as the destructor of the class

c) Automatically initializes an instance of the class

d) Defines a method inside the class

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will len([1, [2, 3], 4]) return?

3
4
2
5

5.

MULTIPLE SELECT QUESTION

30 sec • 2 pts

What library is used for image processing in Python?

Matplotlib

Pillow

Scikit-image
OpenCV

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

x = (1, 2, 3)

y = x[1:]

print(y)

(1, 2, 3)
(3)
(2, 3)
(1, 2)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid NumPy function?

list()
tensor()
set()
array()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?