
Chapter 4 Test: Strings and Methods
Authored by Tim Sexton
others
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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:
2.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What’s the value of x after this code snippet executes? x = "Real" + "Python"
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What’s the value of x after this code snippet executes? x = 1234 + 5
4.
FILL IN THE BLANKS 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
(a)
5.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What’s the value of x after this code snippet executes? x = "1234" + 5
6.
FILL IN THE BLANKS 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.
(a)
7.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
Characters:
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?