H - Substrings

H - Substrings

12th Grade

45 Qs

quiz-placeholder

Similar activities

VOIP XII

VOIP XII

1st Grade - University

50 Qs

PowerPoint  2016

PowerPoint 2016

7th Grade - University

40 Qs

XIRPL2_PASQUIZZ

XIRPL2_PASQUIZZ

1st Grade - Professional Development

50 Qs

ย้อนหลัง กลางภาค Java ระดับต้น

ย้อนหลัง กลางภาค Java ระดับต้น

KG - University

40 Qs

PHOTOPEA-TEST-2023-S2ACC

PHOTOPEA-TEST-2023-S2ACC

12th Grade

46 Qs

iMedia R093 Mix Up#2

iMedia R093 Mix Up#2

9th - 12th Grade

45 Qs

Application Software Quiz

Application Software Quiz

12th Grade - University

50 Qs

98-368 Mobility and Devices Fundamentals Study Guide

98-368 Mobility and Devices Fundamentals Study Guide

9th - 12th Grade

40 Qs

H - Substrings

H - Substrings

Assessment

Quiz

Computers

12th Grade

Practice Problem

Hard

Created by

S Johnston

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?