A binary expression tree is a specific kind of a binary tree used to represent expressions. Two common types of expressions that a binary expression tree can represent are algebraic expressions and boolean expressions. These trees can represent expressions that contain both unary and binary operators.
Algebric Expression Trees
An algebric expression such as (3 * 7) + 9 consists of:
- Operands such as 3, 7, 9 or x, y, z,
- Binary Operators such as +, – , *, /, DIV, MOD, ^
- Unary Operators such as –
Algebric expressions can be represented using a binary expression tree where:
- Each node is an operator,
- Each leaf is an operand.
![]() |
Algebric Expression: (view solution) |
![]() |
Algebric Expression: (view solution) |
![]() |
Algebric Expression: (view solution) |
![]() |
Algebric Expression: |
![]() |
Algebric Expression: |
![]() |
Algebric Expression: |
Boolean Expression Trees
An Boolean expression such as (A OR B) AND C consists of:
- Operands such as A, B, C,
- Binary Operators such as AND, OR, XOR
- Unary Operators such as NOT
Boolean expressions can be represented using a binary expression tree where:
- Each node is an operator,
- Each leaf is an operand.
![]() |
Boolean Expression: (view solution) |
![]() |
Boolean Expression: (view solution) |
![]() |
Boolean Expression: |
![]() |
Boolean Expression: |










In this challenge we will use the print() instruction in Python to create an ASCII-bot: A robot made of ASCII characters, in other words characters that you can type with a standard QWERTY keyboard.
An Italian Takeaway is asking you to write a computer program to facilitate the ordering process and automatically calculate the total cost of an order.
food-menu.txt
A cinema has created a booking system for their main theatre which consists of 48 seats, organised in 6 rows of 8 seats.

For this challenge we will create a variant of the game of Top Trumps using 9 cards, one for each of planet of our Solar System.
Since the establishment of the United States of America, in 1789, 45 people have served as president, the first one being George Washington.

Let’s consider an online Bakery that specialises in selling Birthday Cakes online. The owner of the bakery has estimated all the costs involved and grouped them into two categories:
We have listed all the costs of our online bakery, both fixed and variable into a text file.
Curling is a sport in which players slide stones on a sheet of ice towards a target area which is segmented into four concentric circles. Two teams, each with four players, take turns sliding heavy, polished granite stones, also called rocks, across the ice curling sheet towards the house, a circular target marked on the ice. Each team has eight stones. The purpose is to accumulate the highest score for a game; points are scored for the stones resting closest to the centre of the house at the conclusion of each end, which is completed when both teams have thrown all of their stones. A game usually consists of eight or ten ends.




