python

python

Professional Development

16 Qs

quiz-placeholder

Similar activities

KICK OFF  HA

KICK OFF HA

Professional Development

12 Qs

Apprenticeship Study at the AMRC TC (Level 3)

Apprenticeship Study at the AMRC TC (Level 3)

Professional Development

13 Qs

Mahatma Gandhi Ji Quiz

Mahatma Gandhi Ji Quiz

3rd Grade - Professional Development

20 Qs

PKS

PKS

Professional Development

20 Qs

Konstitusiya -    Milli Məclis

Konstitusiya - Milli Məclis

Professional Development

13 Qs

Present Simple & Present Continuous

Present Simple & Present Continuous

Professional Development

20 Qs

Lixo Marinho

Lixo Marinho

Professional Development

15 Qs

Post Test Internal Training TKBT 2 PT APS

Post Test Internal Training TKBT 2 PT APS

Professional Development

20 Qs

python

python

Assessment

Quiz

Education

Professional Development

Medium

Created by

Auzoom four

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of accessing an element by index in a list in Python?



a) O(1)

b) O(n)

c) O(log n)

d) O(n^2)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output?

lst = [1, 2, 3, 4]

lst[1:3] = [9, 8]

print(lst)

[1, 9, 8, 4]

[1, 2, 9, 8, 4]

[1, 9, 8]

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

lst = [1, 2, 3]

lst.insert(1, 10)

print(lst)

a) [1, 10, 2, 3]

b) [10, 1, 2, 3]

c) [1, 2, 3, 10]

d) Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How would you remove all elements from a list lst?

a) lst.clear()

b) lst.remove()

c) lst.delete()

d) lst.reset()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will the following code output?

lst = [5, 10, 15, 20]

lst[1:3] = [8, 12]

print(lst)

a) [5, 8, 12, 20]

b) [5, 8, 12, 15, 20]

c) [5, 8, 12]

d) [5, 8, 12, 15, 20]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

my_set = {1, 2, 3, 4, 5}

my_set.add(5)

print(my_set)

a) {1, 2, 3, 4, 5}

b) {5, 1, 2, 3, 4}

c) {1, 2, 3, 4, 5, 5}

d) Error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following operation?

a = {1, 2, 3}

b = {3, 4, 5}

result = a & b

print(result)

a) {1, 2}

b) {3}

c) {3, 4, 5}

d) {1, 2, 3, 4, 5}

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?