Skip to content

Program Function and Purpose

Introduced
Handout
Video lesson for this topic Open the video page
6:14

Creative Development

Here is a program that should print the average of two numbers. It runs. It does not crash. It prints an answer — and the answer is wrong. Give it four and six…

English narration · English and 中文 subtitles you can switch

In this lesson

Video lesson
Vocabulary
English Meaning
purpose/ˈpɜːpəs/The aim or intended result of an action or communication.
function/ˈfʌŋkʃn/The role, purpose or operation performed by a part, process or system.
behavior/bɪˈheɪvjə/The way an organism, system or mathematical function acts or responds under particular conditions.
Input/ˈɪnpʊt/Data the program receives — typing, a sensor, a file, the internet.
Processing/ˈprəʊsesɪŋ/The steps it performs on that input.
Output/ˈaʊtpʊt/The result — text, a sound, a saved file, a robot moving.
events/ɪˈvents/An occurrence detected by a program that can trigger a response.
event-driven/ɪˈvent ˈdrɪvən/
event handler/ɪˈvent ˈhændlə/Code that runs in response to an event, such as a button click or a message arriving.

Handout

Log in or create account

IGCSE, A-Level & AP