Step-by-Step Lesson

Learn: String Slicing - Taking Substrings

OCR GCSE J277 Computer Science specification

Ready to start this lesson?

Sign in to track your progress. 15 steps including 7 interactive questions.

Sign In to Start Learning
15 Steps7 Questions

Students also studied

Browse all

Steps in this lesson (15)

1
article

Match the items on the left with their correct pairs on the right

2
article

Match the items on the left with their correct pairs on the right

3
Multiple ChoiceInteractive

What does string slicing allow you to do?

Start the lesson to answer this multiple choice question

4
article

Match the items on the left with their correct pairs on the right

5
Fill in the BlankInteractive

The index of the first character in a string is {{blank0}}, and to slice up to the end of the string, you can leave the {{blank1}} index empty.

Start the lesson to answer this fill in the blank question

6
article

Match the items on the left with their correct pairs on the right

7
Multiple ChoiceInteractive

What will the following code return? text = 'world'; text[1:4]

Start the lesson to answer this multiple choice question

8
article

Match the items on the left with their correct pairs on the right

9
Fill in the BlankInteractive

String slicing is useful for extracting specific {{blank0}} from larger {{blank1}}.

Start the lesson to answer this fill in the blank question

10
article

Match the items on the left with their correct pairs on the right

11
MatchingInteractive

Match the items on the left with their correct pairs on the right

Start the lesson to answer this matching question

12
article

Match the items on the left with their correct pairs on the right

13
Multi-SelectInteractive

Which of the following are true about string slicing? (Select all that apply)

Start the lesson to answer this multi-select question

14
Code CompletionInteractive

Match the items on the left with their correct pairs on the right

Start the lesson to answer this code completion question

15
typedAnswer

Match the items on the left with their correct pairs on the right

Want to Learn More?

Get personalised lessons, quizzes, and instant feedback from your AI tutor.

Explore More Topics