Understand the text-based programming language of Python
Python is a popular text-based programming language that can be used for a wide variety of applications. Students can transition more easily from block-based programming languages to Python rather than other text-based languages because:
- Python is considered to be concise and easy to read
- Python can be interpreted one line at a time, which makes it easy to find mistakes or errors
- Python is highly versatile can be used for both small and complex tasks
- Python is used across multiple industries such as data science, software engineering, app development, and machine learning
Why should I teach Python programming?
Our world is digitally connected. Every single day, the average individual utilizes technology. This technology is often something built by coding in dozens of different ways. We have apps, software, social networks, and a million other creatively enabled pieces of code that shape our daily lives.
Learning to code teaches young people skills that stretch far beyond the computer. From problem solving, abstraction and critical thinking, the benefits of learning to code are immense. Young people also can have fun, be creative, and build future ready skills to help them in their future careers and pathways.
How do I get started with Python programming in my classroom?
Minecraft Education offers a full computer science progression to teach students the basic principles of computer science and supports a scaffolded, intentional coding progression.
The Minecraft Python content is suggested for students in Upper Secondary (Grades 9-12, ages 14-18). The recommendation is to provide students with an opportunity to experience coding in word blocks first so they can focus on understanding and utilizing the coding concepts rather than focusing in on syntax and command structure. The goal is to support and scaffold students' experience to allow them to become excited and engaged with coding. Sometimes Python can be intimidating if it's the very first coding experience that students ever have.
How does Minecraft Education use Python coding?
Minecraft Education uses two different types of Python programming.
The first type of Python programming option is MakeCode Python. MakeCode Python is a custom drag and drop block-based coding language that supports learning Python. Python 101 utilizes MakeCode Python.
The second type of Python programming option is Python and Azure notebooks. Python and Azure Notebooks is traditional text-based Python. Seymour Island and Python Islands utilize Python with Azure Notebooks.
MakeCode Python is great at engaging students and helps them transition from the MakeCode integrated development environment (IDE) to Python with Azure Notebooks. Python with Azure Notebooks is going to more closely resemble what is used in industry.
Which Python lesson should I start with?
Basic Python programming and coding concepts can be taught using these computer science resources:
- Seymour Island
- Python 101
- Python Islands
We recommend completing the content in the listed order, as the lessons progressively become more difficult as students continue through the Python unit.
The Seymour Island lesson is a fun and engaging beginner experience to introduce and transition students into Python programming.
What else do I need to know about Python?
The syntax of the Python programming language is the set of rules that defines how a Python program will be written and interpreted. Think of the grammar and spelling rules in the English language. Syntax is the equivalent in Python coding. A computer can’t understand the commands unless they're laid out properly. Syntax defines the proper way to lay out commands in Python.
Throughout the Python content in Minecraft, there will be numerous opportunities for students to learn and apply the specific syntax to run Python code successfully.
Activity
Here's a sample of Python code.
if agent.inspect("forward") == "diamond ore"
agent.say("I found diamond!")
agent.destroy("forward")
Take 5 minutes to read the code and try to write the pseudocode (plain English) for this piece of Python code.
Questions for consideration
- What do you think is happening in this Python code?
- What is Agent supposed to do if the Python code runs successfully?
- How could using pseudocode (plain English) help someone to understand Python?
Reflection
- Why is Python an important coding language?
- How do you feel about coding in Python?
- What skills do you think will be necessary for students to be successful in Python coding?