Lesson Outcomes
After completing this practical lesson, learners will be able to:
- Create basic program code
- Use variables and data types
- Write simple program statements
- Execute program code successfully
- Display output results
- Identify and correct basic coding errors
Overview
Programming involves writing instructions that computers can execute to perform specific tasks. Basic program code forms the foundation of software development and Robotic Process Automation (RPA) systems.
This practical lesson introduces learners to writing and executing simple programs using variables, data types, inputs, outputs, and basic calculations. Learners will complete practical coding activities involving program creation, execution, debugging, and output verification in a programming environment.
Scenario: Automated Learner Information Program
A software development company is building a learner information system that captures and displays learner details automatically.
Learners are required to create and execute simple programs that process information and display outputs correctly.
PA0301 — Create a Basic Program
Programming begins with writing simple executable instructions.
Tools/Resources
- IDE or coding environment
- PC or laptop
- Programming language interpreter
Activity Instructions
- Create a new program file.
- Write a simple output statement.
- Save the program correctly.
- Execute the program.
Example
Python Example
print("Welcome to Programming")
Expected Outcome
A basic program is created and executed successfully.
Evidence Required
- Screenshot of program code
- Screenshot of program output
PA0302 — Use Variables and Data Types
Variables store information used during program execution.
Tools/Resources
- IDE
- Notebook
- Programming documentation
Activity Instructions
- Create variables with different data types.
- Assign values to variables.
- Display variable values in the program.
- Verify outputs.
Example
name = "John"
age = 20
print(name)
print(age)
Expected Outcome
Variables and data types are used correctly.
Evidence Required
- Screenshot of variable declarations
- Screenshot of displayed outputs
PA0303 — Perform Basic Calculations in Code
Programs commonly perform mathematical calculations.
Tools/Resources
- IDE
- Calculator
- Notebook
Activity Instructions
- Create variables containing numerical values.
- Perform arithmetic calculations.
- Display calculation results.
- Verify outputs manually.
Example
num1 = 10
num2 = 5
total = num1 + num2
print(total)
Output
15
Expected Outcome
Programs perform calculations correctly.
Evidence Required
- Screenshot of calculation code
- Screenshot of program outputs
PA0304 — Capture User Input
Programs may require information entered by users.
Tools/Resources
- IDE
- Programming language interpreter
- Notebook
Activity Instructions
- Create a program that accepts user input.
- Store the entered values in variables.
- Display the entered values.
- Verify the outputs.
Example
name = input("Enter your name: ")
print("Welcome", name)
Expected Outcome
Programs capture and display user input successfully.
Evidence Required
- Screenshot of input code
- Screenshot of user input and output
PA0305 — Identify and Correct Coding Errors
Programming errors must be identified and corrected during development.
Tools/Resources
- IDE
- Debugging tools
- Error logs
Activity Instructions
- Review provided program code.
- Identify syntax or logic errors.
- Correct the errors.
- Execute the corrected program.
Example
Incorrect Code
print("Hello World"
Correct Code
print("Hello World")
Expected Outcome
Coding errors are identified and corrected successfully.
Evidence Required
- Screenshot of incorrect code
- Screenshot of corrected code
- Screenshot of successful program execution
PA0306 — Verify Program Outputs
Programs must produce correct and reliable outputs.
Tools/Resources
- IDE
- Calculator
- Notebook
Activity Instructions
- Execute completed programs.
- Verify all outputs manually.
- Compare expected and actual outputs.
- Correct any identified issues.
Example
Expected Output
20
Actual Output
20
Result
Output verified successfully.
Expected Outcome
Program outputs are verified and confirmed correct.
Evidence Required
- Screenshot of verified outputs
- Written explanation of verification steps
Key Notes
- Program code contains instructions executed by computers.
- Variables store data used during execution.
- Programs may process calculations and user input.
- Syntax errors prevent programs from running correctly.
- Debugging helps identify and correct coding problems.
- Output verification improves software reliability.