H - Substrings

H - Substrings

12th Grade

45 Qs

quiz-placeholder

Similar activities

java

java

10th - 12th Grade

40 Qs

BTec DIT Comp3 - Revision

BTec DIT Comp3 - Revision

10th - 12th Grade

40 Qs

FA4 CANVA TEST

FA4 CANVA TEST

7th Grade - University

40 Qs

HCI MIDTERM EXAMINATIONS

HCI MIDTERM EXAMINATIONS

12th Grade

50 Qs

PRE TEST_OS_MIDTERMS

PRE TEST_OS_MIDTERMS

12th Grade

40 Qs

LATIHAN SOAL

LATIHAN SOAL

10th Grade - University

50 Qs

Remedial Pengetahuan AIJ-12

Remedial Pengetahuan AIJ-12

12th Grade

50 Qs

LATIHAN PTS GENAP INFORMATIKA KELAS 7

LATIHAN PTS GENAP INFORMATIKA KELAS 7

11th - 12th Grade

50 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]

Create a free account and access millions of resources

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?