Did you know?
A prime number is a number that has exactly two factors (1 and itself). Which means that a prime number can be divided evenly only by 1, or itself. A prime number must be a whole number greater than 1.
2, 3, 5, 7, 11, 13, 17… are all examples of prime numbers.
Your challenge:
Write a program that prompts the user to enter a number between 1 and 9999. The program will inform the end-user whether their number is a prime number or not.
Hint:
In Python you can easily calculate the remainder of a division using the % sign.
For instance 7 % 2 would return 1.
So to check if a number “a” can be divided evenly by another number “b” you can check if the remainder of a/b is null using if a%b==0
Solution
So let’s look at the following code used to check if a number is a prime number or not.
Extended Challenges
- Tweak this code to display all the prime numbers between 1 and 9999.
- Write another program that takes a user input and find out if the number being entered is either odd or even.

Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area
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!
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.










