Learning Objectives When your computer prorgam is asking questions to the end-user, the end-user may not answer these questions the way you expected them to. This may cause your program to not work properly. Ideally a good program should use…
We are trying to build a program that will ask the end-user to choose a flag amongst six flags. The program will then try to guess the selected flag by asking a maximum of two questions. Look at the flowchart…
Coding is an Art Let’s first whatch this video clip which shows how a computer program can be used to create a large scale, live and interactive fireworks display: Fireworks Code Inspired by this application of computer science, we have…
Learning Objectives When you write lines of code, there are three ways you can control the order these lines will be executed by the computer: Sequencing: This means that the computer will run your code in order, one line at…
Have you ever been in a sweet shop to buy sweets? For this challenge we are going to spend £5 in a sweet shop hence we need to find out how many sweets we can afford. We will want to…
A window cleaner uses the following pricing policy to calculate how much to charge for cleaning all the windows of his customer’s dwelling. This pricing policy is based on the number of windows that need to be cleaned and works…
In this challenge we are going to create some animated gradients by progressively changing the colour of the screen from one colour (e.g. red) to another (e.g. yellow). RGB Colour Codes Did you know that every colour on the screen…
For this challenge we are going to use Python turtle to create some charts: Column charts, line charts and radar charts. First we need a data set. We will use the following data that shows the market share of the…
For this challenge you are going to write a computer program where the user tries to score a goal against the computer. The user will be asked where do they want to shoot and will have to choose one of…