String Operators in Python

String Operators in Python

8th Grade

6 Qs

quiz-placeholder

Similar activities

Python

Python

7th - 8th Grade

10 Qs

Python Quiz

Python Quiz

6th - 12th Grade

9 Qs

MOAC Excel 2016 Lesson 7

MOAC Excel 2016 Lesson 7

8th - 12th Grade

10 Qs

PYTHON JUNIOR QUIZ-3

PYTHON JUNIOR QUIZ-3

KG - Professional Development

10 Qs

Python Basics

Python Basics

6th - 12th Grade

9 Qs

Python for beginners #1

Python for beginners #1

8th Grade

10 Qs

Q&A – Iteration & Count-Controlled Loops (Primary 4 – 4CT.02)

Q&A – Iteration & Count-Controlled Loops (Primary 4 – 4CT.02)

4th Grade - University

11 Qs

Intro to Python

Intro to Python

KG - University

10 Qs

String Operators in Python

String Operators in Python

Assessment

Quiz

Computers

8th Grade

Hard

Created by

Mr. So

Used 22+ times

FREE Resource

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