Wizarding Code

If you are just getting into coding or want to brush up your skills, here is a collection of courses I have put together for various audiences. If you enjoy the content, please drop me a line and let me know.

In this class we will learn Python with a magical wizard and witch theme. We will start from the basics and build up an impressive list of programming skills over the course. We will discuss methods and topics in programming and actually build programs ourselves like the sorting hat, spell casting, and many other games. This is a great introduction to programming for muggles and wizards alike, and a fun and interactive way to demystify programming with fun examples. Math will be kept to a minimum, and focus on variables like school houses, spells, wands, points against the dark arts, so students learn math concepts without the numbers along the way.

In this course, we will learn how to program in python from the ground up. Each module will have an in-depth video explaining the concepts and working through building programs and examples of concepts. From the very beginning steps into programming (the basics of python) to more complicated programs, we will build up the skills to make our own programs and learn to code. Weekly modules will cover different topics, and scaffold skills so we are able to build more complex programs and think of new ways to solve coding challenges. Students are encouraged to submit the weekly homework to the class, review and play the games and programs we build, and learn and discuss as we go.

Each module will have an overview of the topic we are going to cover, activities and games to learn, build on, and reinforce concepts. We will cover the basics of programming, learn about variables, and ways to store and use information in lists, dictionaries, tuples, and other structures. We will also learn about conditional statements to sort data, and user input and loops. The course will focus on fun and interesting examples to help students understand concepts that can be applied elsewhere.

Because this is a flex class, students will get detailed videos each week that cover the topic of the week, as well as handouts or PowerPoint slides that cover the topic.

Module 1: Introduction to Python

Hello and welcome everyone! I am excited to get this class going!

Just like a Patronus, in this module we are going to learn how to program (conjure?) several interesting examples of using code and learn how to use variables to convert strings, numbers, and build some fun programs.

Harry Potter: "And how do you conjure it?"

Remus Lupin: "With an incantation, which will work only if you are concentrating, with all your might, on a single, very happy memory."

Resources & Setup

Module Files: Download Materials

Module 2: Lists

In this module, we explore lists and see how to store more than one piece of information at a time. Remember that with variables, they keep overwriting each other, but with lists, we can do some neat things to store more than one thing at a time.

Check out the game at the end, and make your own. We also discuss assignment, equality, and how to move things in and out of lists, a great way to "pick up" items and points in games and programs!

Resources

Slides and Code: Download Materials

Module 3: Loops

In this module, we will look at lists and loops. We will use the elements in a list and loop though them using a for loop. We will also talk about some numbers, stats, and a whole lot more.

Resources

Slides and Code: Download Materials

Module 4: Conditional Statements

In this module, we will explore if statements and equality, and play a whole bunch of games, both old and new. Check out the sorting hat and muggle madness, and a new program called hoot which lets you make a version of the OWLs.

We will look at equality, if statements, and new ways to check if things are inside of lists.

Resources

Slides and Code: Download Materials

Module 5: Dictionaries

In this module, we are going to explore Python dictionaries. Dictionaries are data structures that hold key value pairs and use { } brackets instead of [ ] brackets like a list.

We will look at how to create, store, change and use dictionaries to store key value pairs. This is going to make it a lot easier to write sophisticated programs later on and use internet data.

Resources

Slides and Code: Download Materials

Module 6: User Input and While Loops

In this module we talk about user input and while loops. We look at different examples of how to store user input and convert it from a string to an integer for mathematical operations.

We also build a number guessing game using these principles!

Resources

Slides and Code: Download Materials

Module 7: Functions

Welcome to Module 7! In this modules we are going to explore functions and look at different ways to use blocks of code we can use again and again.

These blocks are very important, because they are the basis of our games over the following two weeks when we start working on our text based games.

Resources

Files and Slides: Download Materials

Module 8: Text Based Game

Welcome to Module 8! In this module we are going to expand what we covered with functions to look at how to build a game with functions and a boolean flag.

I start a game from scratch, use a game map, and code each room (function). At times it does not work, but learning from your mistakes is a major part of coding!

If you are looking for something a little shorter with a less complex game, check out the second video that goes through the other code in about half the time.

Resources

Module Files: Download Materials

Module 9: Text Based Game Part 2

Welcome to Module 9, the second of our game classes! In this module we look at many new and different games that use loops, functions, and even APIs.

We'll explore how to improve our games, add mini games, use the clear() function for animation, and more!

Resources

Module Files: Download Materials

Module 10: Connecting to an API

Welcome to Module 10, the first of two exciting explorations of connected data! We will use APIs to gather live data and build programs that use real time data from the internet.

We'll gather data from the Space Station, download cats, ask Hermione advice, play HP trivia, and explore many more interesting programs.

Resources

Useful API Lists:

Module Files: Download Materials

Module 11: More APIs

Welcome to Module 11, the second half of our API exploration! We'll explore various APIs including:

Resources

Module Files: Download Materials

Module 12: Turtle, Final Wrap-up and Beyond

Welcome to Module 12, Turtle (and more)! You made it to the end of the course, way to go!

There is so much that you can do with what you have already learned, and so many more amazing things you can do with Python!

Final Projects