Teaching Python

We're two middle school teachers learning and teaching Python

Five Tips for Teaching Python When You Know Nothing About Python

When I started learning Python a year and a half ago, I did not consider myself a 'real' coder. Although I had taught Lego EV3 robotics, dabbled in HTML in college and grad school, fiddled around with MIT App Inventor and block-based coding, I was still pretty apprehensive about learning a brand new coding language and teaching it to students daily.

Fast forward to today: I have taught hundreds of students how to code in Python, launched a podcast about it, and even attended PyCon and made friends from around the world in the Python community. You can do it too!

If you are looking for a place to start and need a little help, here are my five top tips for teaching coding when you are a coding newbie.

#1. Order lots of books!

I'm not saying that all the books you order will help you learn Python, but as a teacher, having a lot of resources to fall back on can give you a little extra confidence. I recommend getting a full bookshelf of resources that are designed for all levels of Python. Make sure that you get some books that are designed for kids, such as Python for Kids by Jason R. Briggs, Python for Tweens and Teens by Aristides S. Bouras and a Python book for your personal interest. As a teacher, I suggest Automate the Boring Stuff with Python: Practical Programming for Total Beginners by Al Sweigart.

Knowing that the answers to your students' and your own questions lie somewhere within a book is very comforting for a teacher learning a new subject. When a student has a question and does not know the answer, you can help be a facilitator of knowledge and give the student a book. This tactic serves multiple purposes: you encourage the student to research and read about the subject, and it gives you a moment to regain some composure.

In reality, a teacher's role is not to provide answers and be the "sage on the stage," instead, we should be the guide that teaches students the important lifelong learning skills that engage and motivates them. Promoting research and information literacy skills to help learn will come naturally as you teach Python. It is a skill that you will want to instill early on in your course. Even advanced programmers often research answers on sites like Stack Overflow to seek out ways to solve coding problems. It is the nature of coding to research and learn new concepts. In addition to this skill, your students' questions and researching the answers together will push your understanding of the coding language further than if you were learning alone at home.

#2. If you're not on Twitter, get on Twitter!

The Python community is incredibly supportive and open. Even if you are not communicating with them directly, just being a passive voyeur on Twitter can help you learn a lot about the language and the lingo really quickly. There are a lot of teachers out there who teach Python to different age levels. Many people are also just learning Python to have fun and code. There are also many experts out there who know Python and are always willing to help you out. If you search "Python" on Twitter, you can find a few people to follow and start learning with the rest of us. I suggest following @mkennedy from Talk Python, @brianokken from the Test and Code and Python Bytes Podcast, and Julian and Bob from @pybites. These four people have been super supportive in our teaching python journey.

#3. Get a mentor

A coding mentor is a person that will be there to support you through this crazy time! This person does not need to know Python, but it does help a lot if they understand something about computer science or programming.

The most important thing is that you find somebody who believes in you and is willing to pep you up when you're feeling aggravated, listen to you when you're feeling lost or frustrated, and support and commend you on the progress that you have made along the way. Teaching is sometimes a lonely and stressful profession, and teaching a new subject is even harder, but it doesn't have to be! Good mentors know what it is like to be new at something, and they can provide guidance, motivation, and emotional support. Having a colleague, administrator, or someone at your school that is there to pick up your spirits on those difficult or challenging days will help give you the motivation to continue with your learning and teaching journey.

If you do not have someone at your school, I suggest looking outside of your division or find someone you can connect directly with online or in another school. Alternatively, go a step further and find someone on Twitter. My mentor, Sean Tibor (@smtibor), and I are always willing to meet new Pythonistas.

#4. Don't be afraid to learn from your students

More than likely, there will be one or two kids that are natural Python coders or students who have coded in another language. It is only natural, and we are teaching in_ their world_ now. This fact can be very intimidating, and it can be very tempting for you to try to prove that you are the smartest person in the room. Don't! It is okay to _NOT _have all the answers to every question. Empower yourself to let the learning be reciprocal between you and your students. Embrace it and let your students know that you are learning too!

Remember, you are not the sage on the stage anymore. You are modeling a life-long learning mindset. Remind your students about the importance of the learning path. A trait of a good teacher and a great Pythonista is knowing how to ask the right question to research. Also, their questions give you new topics that you may need to learn or investigate.

A good question is one where the student does not know the answer. A great question is where neither the student nor the teacher has the answer!

#5. Just Jump Right Into Learning

It does not really matter where or how you start learning; just do it. Use videos to explain topics that you don't feel comfortable explaining and short tutorials to practice code when you start to feel exhausted from learning. I suggest using a tutorial to help you start teaching your first days of class. It is a great safety crutch, and students often like watching videos. Nevertheless, remember, as your students are learning to code, so are you. Use your teaching to help reinforce your understanding.

I suggest YouTube videos from sentdex and short tutorials from Grok Learning. My students love both of these resources, and so do I. Learning alongside students has helped me to solidify the information and the foundational knowledge of Python. I often watched more and did more exercises than I assigned, but that is because I found them fun and engaging. Find activities that help you learn and that challenge you along your learning journey. Remember, it is okay not to have all the answers on your first day of class. However, it is never okay to stop learning new things!

Good Luck!

Learning how to code in Python has taught me a lot about who I am as a teacher and a lifelong learner. As teachers, we try to instill a passion for learning in our students but sometimes, after teaching for many years, we forget what it feels like to learn something new! Thus, I challenge you to learn something new. Learn how to teach Python!

Every day, I am still practicing and learning Python, and you can too. It's a good feeling to be reminded that you don't know all the answers, but you are confident that eventually, maybe with some struggle, you will find the answers and solve some great problems with Python. Don't be afraid to embrace the struggle, and Happy Coding!