In this section you will find some python problems which require you to perform some problem solving.
1.Spot and list all the errors in the code below. It should find the average of a set of numbers. 2.Now compile the program in any Python IDE (e.g. Geany) and see whether your error list matches Geany’s You need to log in or create an account to submit code!
The computer room has a new air-con unit installed (if only!). If the temperature is less than 15 then the unit switches off. If the temperature gets above 22 then it switches on. It measures the temperature constantly. Create a flow chart for it Write python code (use input to get temperature and print to […]
Your mission, should you accept it, is to forge a piece of code to convert from any currency to any other curreny! Your end user must be able to input the number value and name of the initial currency and the currency of what they want to change to. You can decide how to do this, but don’t forget […]
The following series of numbers is called the Fibonacci Series (discovered by Leonardo Pisano Bigollo aka Fibonacci). 0,1,1,2,3,5,8,13, 21, 34, 55 Write a program to generate this famous sequence of numbers. You need to log in or create an account to submit code!
Given a 4×4 square of numbers with one space – 4 8 9 10 6 12 1 13 3 2 7 5 11 14 15 You need to arrange the cells in numeric order. You can only slide a number up, down, left or right if there is a free space. You need to log […]
Ever wondered if you could beat the odds on the national lottery and become a millionaire? So is it just me??? You are going to build a simulation which will allow the user to play a number of lucky dip lines (6 random numbers). They can play any number from 1 to 1 million. The program will […]
Write a program which will work out how old you are in seconds. It will accept the number of years as input and then output the number of seconds you have been alive for. You may ignore leap years! You need to log in or create an account to submit code!
Ever played the game 21? It is a very simple game. Each player has the choice of saying one, two or three numbers in order. The next player then does the same. The aim of the game is to ensure that the player who ends up on 21 loses! You are to program this game […]
Ever played the game 21? It is a very simple game. Each player has the choice of saying one, two or three numbers in order. The next player then does the same. The aim of the game is to ensure that the player who ends up on 21 loses! You are to program this game […]
Ever played the game 21? It is a very simple game. Each player has the choice of saying one, two or three numbers in order. The next player then does the same. The aim of the game is to ensure that the player who ends up on 21 loses! You are to program this game […]
Two girls, Christine and Gemma, each have a number of apples. Gemma always has more apples than Christine. If there was 12 apples and Gemma had 4 apples more than Christine, how many apples do they both have? Answer Christine has 2 apples Gemma has 10 apples You are to write a program which will […]
Im sure everyones read at least one news artical where hackers have taken down a websites security with ease. What about those websites too strong to crack? You never hear about those. The people who code those defences too strong to break make an obscene amount of money. And for good reason. Your task is […]
To complete this task you need to have completed “Build the wall”. At no point should you print the original password you generate from that code. Without looking at that code you need to write an algorithm to crack your own or someone elses password. Your task is to write a piece of code that […]