Search Header Logo

Python - Strings

Authored by Lucy Stephenson

Computers

Professional Development

Used 12+ times

Python - Strings
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In Python, what symbol do you use to concatenate a string?

*

-

+

/

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

fruit = "apple"

print (len(fruit))

2

3

4

5

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

message = "I love Computer Science!"

print (len(message))

21

22

23

24

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

homework = "Mrs Stephenson, can I have extra homework?"

print (len(homework))

12

22

32

42

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

colour = "Green"

print (colour.upper())

Green

GREEN

Syntax error

green

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

Subject = "Computer Science"

print (Subject.lower())

16

COMPUTER SCIENCE

computer science

Syntax error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of this code?

animal = "cat"

print (cat.lower())

CAT

cat

3

Syntax error

Answer explanation

Wrong variable name.

Incorrect

animal = "cat"

print (animal.lower())

Correct

animal = "cat"

print (animal.lower())

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?