Your PC has been taken over by Derren Brown who is trying to read your mind! Your thinking of a number and the computer will read your mind and guess what that number is! However it is all an illusion! It is really a python program which is doing the hard work. The idea is […]
The code below will generate a list of 2000 numbers randomly. Your task is to sort them into ascending order using bubble sort. import random randomNumbers = [] count = 0 while count < 2000: randomNumbers.append(random.randint(0,10000)) count += 1 In order to do this task you must first research bubble sort to find out how […]
It is important to get into the Christmas spirit by putting up a Christmas tree. * *** ***** ******* ********* *********** ************* *************** Your task is to create a program which will create a ASCII tree like the one above. It must allow the user to select how big the tree will be (how many […]
Binary is used by computers but is little understood by mere mortals like us! The best thing we can do is create a binary converter! So the converter will take in a string of 1s and 0s and output the denary value. However, what if the number is in 2’s complement. We better output both […]