ProceduralOCR J277
DashboardCoursePracticeReviewProgressGlossary
Saved on this deviceContinue learning

Procedural · OCR J277 programming practice

Progress stays in this browser unless you export it.

Course/Strings & arrays/Concatenation, length and case
J277 · 2.2.3

Unit 8 · Lesson 1

Concatenation, length and case

Lesson progress0 / 7

Build the idea

Start with the concept and its key vocabulary.

Key idea

Use concatenation, length, uppercase and lowercase operations in ERL and Python.

Concatenation joins strings with + and does not add spaces automatically. ERL uses text.length, text.upper and text.lower. Python uses len(text), text.upper() and text.lower(). Cast a number with str() before joining it to text.

String manipulation

Performing operations on strings, such as joining, measuring or changing case.

Concatenation

Joining two or more strings using the + operator.

Length

The number of characters contained in a string.

Case conversion

Changing letters to uppercase or lowercase without changing the original wording.

Keep these in mind

  • Every concatenated value must be a string.
  • Add an explicit string containing a space when one is needed.
  • ERL case operations are properties without brackets; Python methods use brackets.
  • String length counts every character, including spaces and digits.

Learning objective

Use concatenation, length, uppercase and lowercase operations in ERL and Python.

Exam tip

For a constructed message, match every space and capital letter exactly. OCR output questions award the complete displayed text.

Common mistake

A comma in Python print() separates displayed items but does not concatenate them. Use + when the task asks you to build one string.

PreviousNext