Chapter 3 Test: Strings and Methods

Chapter 3 Test: Strings and Methods

20 Qs

quiz-placeholder

Similar activities

Review 1

Review 1

KG - University

17 Qs

Suzy and Leah Quiz

Suzy and Leah Quiz

KG - University

18 Qs

Root Word Quiz 16-18

Root Word Quiz 16-18

5th Grade

15 Qs

Suspense Review

Suspense Review

KG - University

15 Qs

Lion King Extra Credit Quizizz

Lion King Extra Credit Quizizz

KG - University

20 Qs

CDA Mock Mini Exam

CDA Mock Mini Exam

Professional Development

16 Qs

"The Cottage" Review

"The Cottage" Review

KG - University

15 Qs

Exploring the Universe Test

Exploring the Universe Test

6th - 8th Grade

25 Qs

Chapter 3 Test: Strings and Methods

Chapter 3 Test: Strings and Methods

Assessment

Quiz

others

Medium

Created by

Dottie Holland

Used 11+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

20 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

30 sec • 5 pts

Which of the following statements contain valid Python string literals? Select all that are correct:
string = 'Hello, world.'
string = "1234"
string = "We're #1!"
string = Hello, world.
string = 1234

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What’s the value of x after this code snippet executes? x = "Real" + "Python"
'Real Python'
'RealPython'
' RealPython '
'realpython'

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What’s the value of x after this code snippet executes? x = 1234 + 5
12345
'12345'
1239
'1239'

4.

FILL IN THE BLANK QUESTION

30 sec • 5 pts

Create a string literal with the following text: Spock said, "Live long and prosper." Assign the string to a variable named vulcan_logic. #hint: pay attention to your spacing

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What’s the value of x after this code snippet executes? x = "1234" + 5
This fails with a TypeError
'12349'
'12345'
12345

6.

FILL IN THE BLANK QUESTION

30 sec • 5 pts

Suppose the following strings are defined: topping1 = "Peanut Butter" topping2 = "Jelly" Use string concatenation to create the string "Peanut Butter & Jelly" that is assigned to a variable named sandwich.

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Characters:
individual letters or symbols in a string
the quotes surrounding a string
joins two strings
gets a single character from a string

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?