H - Substrings
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
S Johnston
Used 1+ times
FREE Resource
Enhance your content in a minute
45 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A substring is:
a sequence of characters within a string
a type of variable
an entire string repeated twice
a function that sorts strings
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Select the correct output of the following code:
mystring = "Hello world"
sub1 = mystring[0:2]
He
Hel
Hello
llo
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Select the correct output of the following code:
mystring = "Hello world"
sub2 = mystring[4:6]
o
o w
w
wo
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does mystring[-1] return if mystring = "Hello world"?
d
H
o
"
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does mystring[:5] return if mystring = "Hello world"?
Hello
Hello
Hello w
world
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which slice would return just the first letter of a string called "text"?
text[0]
text[1]
text[-1]
text[0:2]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following would return the last three characters of a string?
string[-3:]
string[:3]
string[3:]
string[-1:3]
Create a free account and access millions of resources
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?
Similar Resources on Wayground
50 questions
Empowerment Technology - 1st Quarter
Quiz
•
11th - 12th Grade
40 questions
PowerPoint 1
Quiz
•
6th - 12th Grade
40 questions
SOAL SUMATIF 2
Quiz
•
9th - 12th Grade
40 questions
Latihan Soal PSAJ 01
Quiz
•
12th Grade
40 questions
Networking Principles
Quiz
•
11th - 12th Grade
40 questions
Entrepreneurship/Business Plan/College Practice Test
Quiz
•
9th - 12th Grade
46 questions
CompTIA ITFundamentals CRAM
Quiz
•
6th Grade - University
40 questions
Basis Data 2 Soal Semester Ganjil
Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
