Welcome to this lesson on programming with Python. In this lesson, you will learn the basics of the Python programming language and how to write code using the language. We will discuss the different elements that make up a successful program, look at the different types of Python data, and learn how to create basic programs.
1. Introduction to Python language (5 minutes)
- Introduce the terminology and basic concepts of Python programming language
2. Create a program script (20 minutes)
- Create a basic Python program
- Write basic statements, such as “print”
- Use a loop, such as a “for ” statement
- Use basic functions, such as “if/else”
3. Exploring Python data (20 minutes)
- Learn about the different Python data types
- Understand how to manipulate data using methods and functions
- Use objects and classes
4. Exercises (25 minutes)
- Video Resources:
- Video 1: https://www.youtube.com/watch?v=WGVI8-G7VuY
- Video 2: https://www.youtube.com/watch?v=VDEne0ayfCY
- Worksheet Resources
- Worksheet 1: https://www.tutorialspoint.com/python/python_practice_questions.htm
- Worksheet 2: https://www.tutorialspoint.com/python/python_assignments.htm
Throughout the course of the lesson, ask the students probing questions to help them think about Python programming:
- What is the difference between a function and a method?
- What are the benefits of using loops in programming?
- How does the data type affect how we can manipulate the data?
Assess the students' understanding of the Python language and their ability to create basic programs by providing them with problem-solving exercises. The students should be asked to write a program to complete a specific task or answer a specific problem. Specific criteria can be set for each exercise and students can be given feedback on their performance.
To challenge more advanced students, provide them with more complex exercises or ask them to develop their own program to solve the problem at hand. The more basic students can be provided with additional visual aids or guidance, to help them understand the concepts.
At the end of the lesson, review the key concepts that have been discussed in the lesson. Ask the students to summarise what they have learned, such as what is the difference between a function and a method, and why we use loops when coding. Also, ask for opinions on the topics discussed. This will help them understand the overall structure of programming and will give them an opportunity to reflect on the lesson.