Search Header Logo

String Operators in Python

Authored by Mr. So

Computers

8th Grade

Used 26+ times

String Operators in Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

6 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the code:

print ("Hello " + "World")


What is printed?

Hello World

print

Hello + World

an error message

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the code:

print ("a"+"b"+"c")


What is printed?

an error message

6

abc

a+b+c

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the str() command do?

makes things strong

converts whatever is inside the parentheses to a string

converts whatever is inside the parentheses to a number

does nothing

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the code:

print ("hi" * 3)


What is printed?

hi3

hi*3

hihihi

an error message

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the code:

print ("hi" + str(3))


What is printed?

hi + str(3)

hi3

hi"3"

an error message

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Look at the code:

print ("I am " + 13 + " years old.")


What would be printed?

I am 13 years old

I am years old

13

an error message

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?