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]
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?
Similar Resources on Wayground
45 questions
Microsoft Excel - Basics
Quiz
•
7th Grade - University
40 questions
Próbny INF.03 2022
Quiz
•
12th Grade
40 questions
SKT4 : Bab 1 : c) Ralat - Pembolehubah - Pemalar dan Jenis Data
Quiz
•
10th - 12th Grade
50 questions
Application Software Quiz
Quiz
•
12th Grade - University
40 questions
Media and Information Literacy Review Long Quiz
Quiz
•
12th Grade
50 questions
Journalistsic Integrity and Ethics
Quiz
•
9th - 12th Grade
50 questions
VOIP XII
Quiz
•
1st Grade - University
50 questions
XIRPL2_PASQUIZZ
Quiz
•
1st Grade - Professio...
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
