Search Header Logo

Basics of Python Strings and Lists

Authored by Isaiah Mercado

Computers

9th Grade

Used 26+ times

Basics of Python Strings and Lists
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

What is the index of the first character in a Python string?

0

1

-1

2

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method would you use to convert a string to all uppercase letters in Python?

upper()

lower()

capitalize()

title()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the following code snippet?

World

Hello

, Wor

World!

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

list = [1, 2, 3]

list = (1, 2, 3)

list = {1, 2, 3}

list = <1, 2, 3>

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What will be the output of the following code?

0 1 2

1 2 3

0 1 2 3

1 2

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct syntax for a while loop in Python?

while (condition) { }

while condition:

while condition { }

while (condition):

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the result of the following expression?

Error

n

Python

Pytho

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?