← All STRAIT modules
TutorDA · STRAIT
Module A-C3

Introduction to Programming with Python

This module introduces learners to computational thinking and procedural programming using Python 3. Students write small programs using variables, control flow, functions and core data structures such as lists and dictionaries. The course emphasises reading error messages, tracing code by hand, and using the standard library. Learners finish able to design, implement and debug short Python programs that solve defined problems.

Learning Outcomes

1.
Describe how Python source code is executed by an interpreter.
2.
Declare variables of the correct built-in type (int, float, str, bool, list, dict).
3.
Use conditional statements and loops to control program flow.
4.
Define and call functions with parameters, defaults and return values.
5.
Manipulate strings, lists and dictionaries using indexing, slicing and comprehensions.
6.
Read and interpret common Python error messages such as SyntaxError and IndexError.
7.
Import and use modules from the Python standard library.
8.
Trace short Python programs to predict their output.

Topics Covered

The Python interpreter and REPL
Variables, identifiers and assignment
Primitive data types and casting
Operators and expressions
Strings, indexing and slicing
Conditional statements (if, elif, else)
Loops (for, while, range, break, continue)
Lists, tuples and list methods
Dictionaries and sets
Functions, parameters and return values
Scope, local vs global variables
Common exceptions and tracebacks
Modules and the standard library (math, random, datetime)
File input and output
Simple algorithms and problem decomposition

Skills Developed

Reading and tracing Python code Writing short Python scripts Debugging using error messages Choosing appropriate data structures Decomposing problems into functions Using the Python standard library Testing programs with sample inputs Documenting code with comments and docstrings

Suggested Resources

{'title': 'Automate the Boring Stuff with Python', 'author': 'Al Sweigart', 'source': 'automatetheboringstuff.com'}
{'title': 'Python for Everybody', 'author': 'Charles Severance', 'source': 'py4e.com'}
{'title': 'The Python Tutorial', 'author': 'Python Software Foundation', 'source': 'docs.python.org/3/tutorial'}
{'title': 'Think Python, 2nd Edition', 'author': 'Allen B. Downey', 'source': 'greenteapress.com'}
{'title': 'Real Python Beginners Path', 'author': 'Real Python Team', 'source': 'realpython.com'}
{'title': "CS50's Introduction to Programming with Python", 'author': 'David J. Malan', 'source': 'cs50.harvard.edu/python'}
{'title': 'Replit Learn Python', 'author': 'Replit', 'source': 'replit.com/learn'}

Assessment

Learners are assessed through weekly coding exercises, two short programming projects, a code-tracing worksheet, and a final multiple-choice knowledge test.

weekly_exercises20%
mini_project_120%
mini_project_220%
code_tracing_worksheet20%
final_mcq_test20%
Practice bank: 200 MCQs · Timed mock & self-paced modes
Start Practice →