1 - Basics Programming
1 - Basics Programming
Activity
Working in groups of 2 students
Create a set of instructions that
will tell us:
is called an ALGORITHM
An ALGORITHM is basically an outline for
how your computer program will work
What is Programming? conts.
Developing an Algorithm is really just a type of
Problem Solving
We have to:
READ and understand the problem
THINK about different solutions to the
problem
DESIGN an approach that will solve the
problem
IF NEEDED
IMPLEMENT that design
TEST to see if it works
What is Programming? conts.
THINKING about the solution often means
breaking down complex tasks into smaller,
easier to understand tasks
These tasks must be well-defined so that we
understand what the action is acting on
e.g. telling a person to grab a banana will only work if
the person knows what a banana is
The tasks have to be easy to understand
e.g. telling a person to PEEL a banana will only work
if they understand what peeling means
What is Programming? conts.
When the algorithm is written out as a
well-thought series of steps, it is
sometimes called PSEUDOCODE
It is written in easy to understand language,
but is written very similar to the way that you
would code it into your 3rd Generation
Language
How To Eat A Banana:
A Detailed List of Instructions
• Interpretation:
▫ Better diagnostics (error messages)
▫ More flexibility
▫ Supports late binding (delaying decisions about program implementation
until runtime)
Can better cope with PLs where type and size of variables depend on input
Mixture of Compilation vs Interpretation