Search Header Logo

Kiruthika

Authored by Kiruthika S

Computers

University

Used 1+ times

Kiruthika
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What method adds an element to the end of a list?

add()

append()

insert()

extend()

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following is the correct syntax to access the third element of a list named my_list?

my_list[2]

my_list(3)

my_list{3}

my_list[3]

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What will be the output of len([1, 2, 3, 4])?

3

4

5

None

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which function is used to sort a list in ascending order?

sort()

order()

arrange()

organize()

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

How do you access the value associated with the key 'name' in a dictionary person?

person['name']

person.get('name')

All of the above

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following is a valid way to create a dictionary in Python?

dict = {1: 'one', 2: 'two'}

removedict = [1: 'one', 2: 'two']

dict = (1: 'one', 2: 'two')

dict = '1: one, 2: two'

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What method removes a key-value pair from a dictionary?

delete()

remove()

pop()

discard()

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?