← SC in Schools Python

Combining Colour, Highlight and Style

Joining multiple dot-notation values together with + to apply colour, highlight, and style all at once

Understanding Combining Colour, Highlight and Style in SC in Schools Python

What it does: This description matches combining effects, which are chained together using +. The + operator joins each Colour, Highlight, and Style value, and the string, into one expression. Values like Colour.red or Style.bold are written without quotation marks, using dot notation. You don't need all three — any combination, including just two, can be joined with +. Using a comma instead of + breaks the chain of combined effects. This system requires the capitalised spelling Style, not lowercase style.

Common mistakes: Combined effects should be joined with +, not a comma — it should read Colour.blue + Style.italic. Style must start with a capital S, not lowercase style — it should read Style.bold.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 64–73) and word search (Modules 64–73).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
Can Colour., Highlight., and Style. all be combined in one print() call?
TrueFalse
Matches
print(Colour.blue, Style.italic + "Stop!")
↓
Combined effects should be joined with +, not a comma
Applying
Meanings
Term
Colour.red + Highlight.yellow + Style.bold
Meaning
Joining multiple dot-notation values together with + to apply colour, highlight, and style all at once
Practice
print(Colour.red + Highlight.yellow + Style.bold + "Level up!")
Testing
Gaps
print(Colour.red + .yellow + Style.bold + "Level up!")
Check Answer
Spots
1print(Colour.blue, Style.italic + "Stop!")
2print(Colour.red + Highlight.yellow + Style.bold + "Go!")

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Constellation Wolf' badge — Space Legend, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. Can Colour., Highlight., and Style. all be combined in one print() call?
A. False
B. True ✓
Multiple dot-notation values can be chained together with + to apply several effects at once.
2. Should combined values be joined using + or commas?
A. + ✓
B. Commas
Each value, including the final string, is joined together using the + operator.
3. Does the order of Colour, Highlight, and Style matter for the effect to work?
A. No, any order works ✓
B. Yes, they must be alphabetical
Colour, Highlight, and Style can be combined in any order, as long as they're joined with + before the string.
4. Should the string being displayed also be joined with +?
A. False
B. True ✓
The final string is joined to the combined effects using +, just like each individual value.
5. Should Colour, Highlight, and Style each start with a capital letter?
A. True ✓
B. False
Each keyword — Colour, Highlight, and Style — starts with a capital letter followed by a dot.

Match the Pairs

print(Colour.red + Highlight.yellow + Style.bold + "Go!") → Displays bold red text with a yellow highlight
print(Colour.blue + Style.italic + "Stop!") → Displays italic blue text with no highlight
Joining multiple dot-notation values with + before the string → Combining Colour, Highlight and Style
The symbol used to chain each effect together, including the final string → +
print(Colour.blue, Style.italic + "Stop!") → Combined effects should be joined with +, not a comma
print(Colour.red + style.bold + "Danger") → Style should start with an uppercase S, not lowercase style

Key Term

Colour.red + Highlight.yellow + Style.bold
Joining multiple dot-notation values together with + to apply colour, highlight, and style all at once

Fill in the Blanks

1. print(Colour.red + Highlight.yellow + Style.bold + "Level up!")
Hint: Type the word used to set the highlight colour
2. print(Colour.red + Highlight.yellow + Style.bold + "Level up!")
Hint: Type the word used to set the text style
3. print(Colour.blue + Style.italic + "Warning!")
Hint: Type the symbol used to join two effects together
4. print(Colour.green + Highlight.pink + Style.underline + "Great job!")
Hint: Type the symbol used to join the style to the string
5. print(Colour.gold + Style.bold + "Score: 100")
Hint: Type the function used to display the combined effects

Spot the Error

Question 1
A print(Colour.blue, Style.italic + "Stop!")
B print(Colour.red + Highlight.yellow + Style.bold + "Go!")
C print(Colour.green + Style.underline + "Wait")
Line A — Combined effects should be joined with +, not a comma — it should read Colour.blue + Style.italic.
Question 2
A print(Colour.red + style.bold + "Danger")
B print(Colour.gold + Highlight.black + "Score")
C print(Highlight.pink + Style.italic + "Note")
Line A — Style must start with a capital S, not lowercase style — it should read Style.bold.
Question 3
A print(Colour.purple + Highlight.yellow + "End"
B print(Colour.blue + Highlight.grey + Style.bold + "Start")
C print(Colour.green + Style.underline + "Middle")
Line A — This line is missing its closing bracket — it should read print(Colour.purple + Highlight.yellow + "End").
Question 4
A print(Colour.red + Highlight.white + "Alert")
B print(Style.bold + Colour."blue" + "Notice")
C print(Highlight.green + Style.italic + "Info")
Line B — Colour values are not written in quotation marks — it should read Colour.blue.
Question 5
A print(Colour.orange + Highlight.grey + Style.bold + "Loading")
B print(COLOUR.red + Highlight.pink + "Error")
C print(Highlight.gold + Style.underline + "Complete")
Line B — Only the first letter of Colour should be capitalised — it should read Colour.red, not COLOUR.red.

Student with a class code? Join your class →