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
40 questions
Semester Final 2025

Quiz
•
10th Grade - University
40 questions
3 Tri C# 1

Quiz
•
12th Grade
50 questions
SAINS KOMPUTER TINGKATAN 4 BAB 1

Quiz
•
3rd Grade - University
40 questions
Quizz PTS Kelas XI Struktur Data Array

Quiz
•
11th Grade - University
50 questions
PYTHON-STRINGS

Quiz
•
12th Grade
40 questions
Python - Lists, Dictionaries and Loops

Quiz
•
9th - 12th Grade
50 questions
Python Programming Quiz

Quiz
•
11th Grade - University
50 questions
LATIHAN PAT INFORMATIKA KELAS X

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade