Algorithms in Python
Time: 18:00 - 21:00
This course will be delivered online. See the ‘What is the course about?’ section in course details for more information.
Course Code: CAPY03
Duration: 4 sessions (over 4 weeks)
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 do not 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 do not 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.
This is a live online course. You will need:
- Internet connection. The classes work best with Chrome.
- A computer with microphone and camera.
We will contact you with joining instructions before your course starts.
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...
• Identify 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 trade-offs 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, which this course is designed to follow on from. 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.
When I've finished, what course can I do next?
Please click here to view our Programming courses.
Rich is a programmer, writer and educator with a particular interest in creative practice. In his previous career he worked as a software developer in the CIty, first at a dot-com startup and later at a top-tier investment bank where he worked mostly on trading floor systems and got to play with a wide range of languages and technologies. He now teaches coding and maths-related courses full time. Besides his work at City Lit he also teaches at Central Saint Martins, the Architecture Association and the Photographer's Gallery and is the author of two books about mathematics. His technical collaborations with artists have been shown at, among others, the Hayward gallery, the V&A, the ICA and Camden Arts Centre. He has a BSc in Mathematics from the Open University. He also has a BA in English Literature and a PhD in philosophy (both from Cardiff). He continues to teach a little philosophy and literature, especially as they intersect with his other interests, and as a partner in Minimum Labyrinth he has brought these ideas to wider audiences in collaboration with the Museum of London, the Barbican and various private sponsors.
Please note: We reserve the right to change our tutors from those advertised. This happens rarely, but if it does, we are unable to refund fees due to this. Our tutors may have different teaching styles; however we guarantee a consistent quality of teaching in all our courses.