Search Header Logo

String & List in Python

Authored by Tamil Selvi

Computers

11th - 12th Grade

Used 7+ times

String & List in Python
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

30 sec • 1 pt

Which of these is the correct code for creating a list of names?

nameList = John, Harry, Jesse, John, Harry, Harry

nameList = ("John", "Harry", "Jesse", "John", "Harry", "Harry")

nameList = ["John", "Harry", "Jesse", "John", "Harry", "Harry"]

nameList = [John, Harry, Jesse, John, Harry, Harry]

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

List items have an index number. In the following list, which item has the index number of 3?

["JOHN", "Harry", "Jesse", "John", "Harry", "Harry"]

"John"

"Harry"

"Jesse"

"JOHN"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

To print a list called fruitList we use

print(fruitList)

list(print)

fruitList.print()

fruitList(print)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which colour will be replaced with yellow?

red

green

blue

none, yellow will be added to the list

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which symbols are used to open and close a list?

( ) round brackets

( ) curly brackets

[ ] square brackets

" " speech marks

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Each item in a list has an "address" or index. The first index in a Python list is what?

0
1
a
A

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What output will this code produce?

4
2
3
5

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?