Search Header Logo

Python Day 5

Authored by ASWIN LAKSHMAN Y

Computers

University

Used 1+ times

Python Day 5
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create an empty list?

my_list = {}

my_list = []

my_list = ()

my_list = [None]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you add the element `5` to the end of a list named `numbers`?

numbers.add(5)

numbers.append(5)

numbers.insert(5)

numbers.extend(5)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the first element of a list named `fruits`?

fruits[0]

fruits[1]

fruits[first]

fruits.get(0)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you remove the element `10` from a list named `numbers`?

numbers.delete(10)

numbers.pop(10)

numbers.remove(10)

numbers.discard(10)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you find the length of a list named `items`?

len(items)

items.length()

items.size()

length(items)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create an empty tuple?

my_tuple = {}

my_tuple = []

my_tuple = ()

my_tuple = (None)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you access the second element of a tuple named `my_tuple`?

my_tuple[1]

my_tuple[0]

my_tuple[2]

my_tuple(1)

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?

Discover more resources for Computers