For this challenge we are investigating how barcodes are produced. Though there are different standards to produce barcodes, they all follow a similar approach based on binary code!
Did you know?
On a barcode the pattern made using black and white lines is in fact binary code! A black line represents a 1 and a white line a 0.
So the following binary code “0101” consists of a thin white line, a thin black line, a thin white line and a thin black line.
The following binary code “1110” however consists of a large black line (as thick as 3 lines) and a thin white line.
So to produce our own simplified bar codes all we need to know is convert each digit of the actual number into binary (using 4 digit binary codes, aka a nibble)
| Decimal | Binary |
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
Using Python to generate random barcodes
Your Challenge
Adapt this script to ask the end-user to enter their initials. Use the ASCII table to convert these initials into ASCII and then into binary code to then generate a barcode matching those initials.
Can computers produce artwork? In this challenge we are looking at how to write a piece of code to generate a “pretty” graphic.

Most artillery games are based on the Projectile Motion Formula used to trace the trajectory of a projectile thrown in the air. Due to gravity, its trajectory will be a parabola which shape will vary based on the angle and initial velocity of the projectile.


In this challenge we are going to use Python to draw a music score by positioning notes on the staff.
Inspired by the football worldcup we came up with our own Python script to implement the goal line technology.












