Skip to content
@CodingChallengesBooklet

GCSE/A-Level Coding Challenges Booklet

A collection of solutions to the OCR GCSE/A-level coding challenges booklet. Each solution is explained and in multiple languages!

GCSE/A-level Coding Challenges Booklet Organisation

This organisation is a collection of solutions to the OCR GCSE/A-level Computer Science Coding Challenges Booklet. Each coding challenge in the booklet has it's own repoistory within this organisation. Each repository will include a README explaining the code challenge and the solution. Repositories may have multiple solutions stored in folders by the language used.

GitHub followers Twitter Follow

Code Challenges

If you would like to search through the code challenges, I would recommend clicking on the repositories button next to "Overview" in the top row of button and using the search bar there. You can search using the name of the challenge, the difficulty Easy, Medium, Hard, the language such as Python, Rust, C, Java, or by searching for a key word to do with the challenge such as Recursion or Game.

Challenge Repository Languages Difficulty Description
Factorial Finder Click Here Python, Rust Easy The Factorial of a positive integer, n, is defined as the product of the sequence n, n-1, n-2, ...1 and the factorial of zero, 0, is defined as being 1. Solve this using both loops and recursion.
Speed Tracker Click Here Python Easy Create a program that takes a time for a car going past a speed camera, the time going past the next one and the distance between them to calculate the average speed for the car in mph. The cameras are one mile apart.
Thief Click Here Python Easy Design and write a program that displays all the possible combinations for any four numerical digits entered by the user. The program should avoid displaying the same combination more than once.
Classification Click Here Python Easy A simple classification system asks a series of Yes/No questions in order to work out what type of animal is being looked at.
Fruit Machine Click Here Python Easy Write a program to simulate a Fruit Machine that displays three symbols at random from Cherry 🍒, Bell 🔔, Lemon 🍋, Orange 🍊, Star ⭐, Skull 💀.
Unit Converter Click Here Python Easy Converts various units between one another. The user enters the type of unit being entered, the type of unit they want to convert to and then the value. The program will then make the conversion .

Pinned Loading

  1. FactorialFinder FactorialFinder Public

    The Factorial of a positive integer, n, is defined as the product of the sequence n, n-1, n-2, ...1 and the factorial of zero, 0, is defined as being 1. Solve this using both loops and recursion.

    Python 2

  2. SpeedTracker SpeedTracker Public

    Create a program that takes a time for a car going past a speed camera, the time going past the next one and the distance between them to calculate the average speed for the car in mph. The cameras…

    Python

  3. UnitConverter UnitConverter Public

    Converts various units between one another. The user enters the type of unit being entered, the type of unit they want to convert to and then the value. The program will then make the conversion.

    Python

  4. FruitMachine FruitMachine Public

    Write a program to simulate a Fruit Machine that displays three symbols at random from Cherry 🍒, Bell 🔔, Lemon 🍋, Orange 🍊, Star ⭐, Skull 💀.

    Python

  5. Thief Thief Public

    Design and write a program that displays all the possible combinations for any four numerical digits entered by the user. The program should avoid displaying the same combination more than once.

    Python

  6. CreditCardValidator CreditCardValidator Public

    Takes in a credit card number from a common credit card vendor (Visa, MasterCard, American Express, Discoverer) and validates it to make sure that it is a valid number (look into how credit cards u…

    Python 1

Repositories

Showing 10 of 13 repositories
  • Ordering Public

    Create a program that allows entry of 10 numbers and then sorts them into ascending or descending order, based on user input. The user can input a word or string, and it arranges the string into alphabetical order. E.g. My Rabbit would be shown as “abbimty “. (Punctuation placement is not essential)

    CodingChallengesBooklet/Ordering’s past year of commit activity
    Python 0 Unlicense 1 0 0 Updated Aug 2, 2022
  • Palindromes Public

    Write a program that checks if a string entered by the user is a palindrome. A palindrome is a word that reads the same forwards as backwards like “racecar" or "hannah".

    CodingChallengesBooklet/Palindromes’s past year of commit activity
    Python 0 Unlicense 0 0 0 Updated Aug 2, 2022
  • Hack-proof Public

    Create a program that will only open a text document if the correct password is entered. The user should choose the username and password first and it should also verify the password before allowing it.

    CodingChallengesBooklet/Hack-proof’s past year of commit activity
    0 Unlicense 0 0 0 Updated Aug 2, 2022
  • CasearCipher Public

    Implement a Caesar cipher, both encoding and decoding. The key is an integer from 1 to 25. This cipher rotates the letters of the alphabet (A to Z). The encoding replaces each letter with the 1st to 25th next letter in the alphabet (wrapping Z to A). So key 2 encrypts “HI” to “JK”, but key 20 encrypts “HI” to “BC”.

    CodingChallengesBooklet/CasearCipher’s past year of commit activity
    Python 0 Unlicense 0 0 0 Updated Aug 2, 2022
  • CodeChallengeTemplate Public template

    A GitHub repository template for creating the code challenges. Includes, Issues templates, Topics, Code of Conduct, Contributing guidelies, and funding details. This is for easy set up of code challenges.

    CodingChallengesBooklet/CodeChallengeTemplate’s past year of commit activity
    0 Unlicense 0 0 0 Updated Aug 2, 2022
  • CreditCardValidator Public

    Takes in a credit card number from a common credit card vendor (Visa, MasterCard, American Express, Discoverer) and validates it to make sure that it is a valid number (look into how credit cards use a checksum).

    CodingChallengesBooklet/CreditCardValidator’s past year of commit activity
    Python 1 Unlicense 0 0 0 Updated Aug 1, 2022
  • UnitConverter Public

    Converts various units between one another. The user enters the type of unit being entered, the type of unit they want to convert to and then the value. The program will then make the conversion.

    CodingChallengesBooklet/UnitConverter’s past year of commit activity
    Python 0 Unlicense 0 0 0 Updated Aug 1, 2022
  • FruitMachine Public

    Write a program to simulate a Fruit Machine that displays three symbols at random from Cherry 🍒, Bell 🔔, Lemon 🍋, Orange 🍊, Star ⭐, Skull 💀.

    CodingChallengesBooklet/FruitMachine’s past year of commit activity
    Python 0 Unlicense 0 0 0 Updated Aug 1, 2022
  • Classification Public

    A simple classification system asks a series of Yes/No questions in order to work out what type of animal is being looked at. Carry out some simple research on classification trees, then write a program to help the user decide between the following: horse, cow, sheep, pig, dog, cat, lion, tiger, whale, dolphin, seal, penguin, ostrich, sparrow, s…

    CodingChallengesBooklet/Classification’s past year of commit activity
    0 Unlicense 0 0 0 Updated Aug 1, 2022
  • Thief Public

    Design and write a program that displays all the possible combinations for any four numerical digits entered by the user. The program should avoid displaying the same combination more than once.

    CodingChallengesBooklet/Thief’s past year of commit activity
    Python 0 Unlicense 0 0 0 Updated Aug 1, 2022