Chapter 3 Test: Strings and Methods

Chapter 3 Test: Strings and Methods

20 Qs

quiz-placeholder

Similar activities

Writing good introduction for data-based charts

Writing good introduction for data-based charts

9th Grade

15 Qs

Tes Training 12 (SWM)

Tes Training 12 (SWM)

Professional Development

19 Qs

Hito 3

Hito 3

KG - University

20 Qs

Unidad 6. Formas jurídicas.

Unidad 6. Formas jurídicas.

KG - University

20 Qs

Kwéyòl Review Assessment

Kwéyòl Review Assessment

KG - University

19 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 in a minute

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?