H - Substrings

H - Substrings

12th Grade

45 Qs

quiz-placeholder

Similar activities

City and Guilds Award in Cloud Services

City and Guilds Award in Cloud Services

12th Grade

40 Qs

Graphic Design Principles & Elements of Design (20 min)

Graphic Design Principles & Elements of Design (20 min)

9th - 12th Grade

40 Qs

Pemrograman Dasar

Pemrograman Dasar

10th - 12th Grade

50 Qs

Unit 5 Formative

Unit 5 Formative

9th - 12th Grade

40 Qs

Ôn Tập Chuong III - Tin 11

Ôn Tập Chuong III - Tin 11

6th Grade - University

40 Qs

Data Communication and Network

Data Communication and Network

11th Grade - University

50 Qs

Cambridge technical IT Unit 1 1.1 and 1.2

Cambridge technical IT Unit 1 1.1 and 1.2

11th - 12th Grade

50 Qs

LATIHAN PAT INFORMATIKA KELAS X

LATIHAN PAT INFORMATIKA KELAS X

9th - 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?