Algorithms
Binary Search
I am thinking of a number from between 1 to 111. How many guesses will you need to find out exactly what number I am thinking of (after every guess, you will know if the number I am thinking of is higher or lower), and code a solution which will make the most efficient guesses in order to find the number. Binary search may come in handy...
GIS Submit>>
I am thinking of a number from between 1 to 111. How many guesses will you need to find out exactly what number I am thinking of (after every guess, you will know if the number I am thinking of is higher or lower), and code a solution which will make the most efficient guesses in order to find the number. Binary search may come in handy...
GIS Submit>>
Bullet Proof Search
Write a program that performs a binary search, but in the event it can't find an item it sorts the list and performs the search again. Only then does it report back that it can't find the item.
GIS SUBMIT>>
Write a program that performs a binary search, but in the event it can't find an item it sorts the list and performs the search again. Only then does it report back that it can't find the item.
GIS SUBMIT>>
Sort it Out!
Get warmed up for some sorting (Animation) with the classic Bubble Sort (GIS Submit) and then move onto an insertion sort. (GIS Submit)
Get warmed up for some sorting (Animation) with the classic Bubble Sort (GIS Submit) and then move onto an insertion sort. (GIS Submit)
Dictionaries
Learn how to use dictionaries with our guide from Think Like a Computer Scientist.
Then submit your code at: A214
Learn how to use dictionaries with our guide from Think Like a Computer Scientist.
Then submit your code at: A214
Big O Display
Let's start with get the real times your algorithms are taking. Then we can use a little Matplotlib magic to display Big O. |
Recursion
Object oriented
declarative
We introduce declarative programming with Prolog.
File handling
exception handling
Learn how to deal with Exceptions.