H - Substrings

Quiz
•
Computers
•
12th Grade
•
Hard
S Johnston
Used 1+ times
FREE Resource
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
Similar Resources on Wayground
50 questions
Pothia Assessment

Quiz
•
12th Grade
40 questions
10th Grade 10 - IT Programming - 2nd Cycle Exam

Quiz
•
10th Grade - University
41 questions
IB Computer Science A1.1 ,B1.1,B2.1,B2.1.1,B2.1.2

Quiz
•
12th Grade
40 questions
Ulangan Harian Sem 1

Quiz
•
11th Grade - University
50 questions
Quiz on SDGs, Entrepreneurship, and Python

Quiz
•
10th Grade - University
40 questions
Revision Quiz 1

Quiz
•
12th Grade
40 questions
แบบทดสอบ Coding : Micro Python 1

Quiz
•
9th - 12th Grade
50 questions
TES TEORI KELAS 7 2025

Quiz
•
8th Grade - University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade