9-U3C1-Python Programming - Python Basics
9-U3C1-Python Programming - Python Basics
Teacher: ____________________________________________________________________________________
Learning Support Assistant: ____________________________________________________________
Estimated time: 160 min.
Learning Objectives
By the end of this session, students will be able to:
1. Explain basic programming fundamentals.
2. Write simple algorithm.
3. Express algorithms in the form of flowcharts.
4. List distinct features of python.
5. Download and install python IDLE from python.org.
6. Differentiate between interactive and script mode of python IDLE.
7. Apply arithmetic operators and access string contents.
8. Declare and use variables.
9. Differentiate among various data types.
10. Perform input and output using python scripts.
11. Understand the use of functions necessary to convert a data type into another.
12. Use + operators with strings also.
Entry behaviour
Students have understanding of basic Python coding from previous classes. Still, they need to begin Python
from the basics to recall what they learnt and also to understand the language in desired detail.
Note: This chapter is practical-based and shall be taught in the computer lab. Students will try programs
hands-on during the lecture for quick understanding.
Session Conduction
Pedagogical Teacher Activities Students Resources and
Phase Activities Method
Engage Show some simple Python codes to help students Listen, follow Interactive
recall how Python scripts look like. and interact. conversation.
Discuss that before picking up any programming
language, first the basic approach of programming
needs to be understood. Planning is important before
actual programming.
Concept Explain the basic flow of any program (Input- Listen, follow Interactive
introduction Process-Output cycle). and interact. conversation.
Define the term algorithm and show some examples
of how an algorithm looks like.
Show a sample flowchart and explain how an
algorithm is visually expressed using a flowchart.
Explain the use of main parts of a flowchart.
Demonstrate some examples of simple flowchart,
decision-based flowchart and a loop-based flowchart.
Ask:
Why do we have Python as the main language in the
syllabus of artificial intelligence?
Answer: Python is one of the standard programming
language for data science and artificial intelligence
applications due to many of its striking features such
as syntax is like plain English, rich set of pre-
designed codes to pick and use – they are called
packages or libraries, interpreter to test the
programs easily, etc.
Python programs are called scripts.
Discuss about the main features of Python here with
more stress on:
Readability & indentation
Open source
Libraries
Portability
Compiler & Interpreter
Procedure oriented and OO programming
Garbage collection
Concept Demonstrate the download and installation of Python Listen, follow Interactive
explanation IDLE and show how to use some common arithmetic and interact. conversation.
operations on the IDLE command prompt. Do activities.
After command mode, demonstrate how to write
scripts, save then as .py files and execute them.
Show how interpreter halts the program when an
error is encountered by using the example in the
book.
Show how Python statements are written.
Explain the significance of comments with examples
showing single and multi-line comments.
Reinforcement activities
Students will complete the practical problems at chapter end in the lab.
Additional activities