What is the course about?
An algorithm is a recipe for solving a problem, and solving problems is a large part of what programming is all about. Programmers don’t only have good general problem-solving skills, they also rely on a large body of standard algorithms that help them get to the solution quickly.
Practical examples of the problems we will consider include:
• Shuffling a deck of cards;
• Queuing requests so they’re processed in the correct order;
• Searching through a set of data for items that match some chosen criteria;
• Finding your way out of a maze
• Diagnosing a medical condition
These are domain-specific problems but the algorithms that solve them have much wider applications. A single problem might be solved by more than one algorithm, and we will also consider how to weigh their pros and cons in order to make an informed choice between them.
This course aims to help if you already know a little Python but don’t yet feel you know how to “think like a programmer”. To promote understanding and help to hone your problem-solving skills, we will often solve a problem “from scratch” rather than using, say, a built-in library function.
We therefore look at the algorithms both theoretically and practically. First we will make sure we understand exactly what the problem is and how the algorithm works. Then you will write Python code that “implements” the algorithm. We will also consider wider and sometimes unexpected applications that your code may have.
What will we cover?
• Data structures such as linked lists, queues, hashmaps and stacks
• State machines
• Algorithms for sorting and searching through data
• Approaches to pathfinding (exhaustion, flood fill, A*) and decision-making (decision trees)
• Functions, including recursive functions.
What will I achieve?
By the end of this course you should be able to...
• Idnetify and work with a variety of Python data structures and use them to solve
• Use a state machine to manage a process that can respond to external events.
• Write your own algorithms for sorting and searching and understand the tradeoffs involved.
• Write a pathfinding algorithm to solve a maze.
• Use a decision tree to navigate a complex set of information.
What level is the course and do I need any particular skills?
You need to know a little of the Python language, at the level of City Lit’s Introduction to Python. This course is designed to follow on from that one. You do not need to be a Python expert or an experienced programmer.
How will I be taught, and will there be any work outside the class?
We will use a mixture of presentation, discussion and practical coding in class, but to get the most out of this course you will need to set aside a few hours to do some coding outside class each week.
Are there any other costs? Is there anything I need to bring?
No other costs, just bring Pen and Paper for your own notes. Computers are provided for each student.
When I've finished, what course can I do next?
Intermediate Python, Data analytics with Python: introduction, introduction to machine learning.