Topic 1 - Introduction To Programming Concepts
Topic 1 - Introduction To Programming Concepts
[email protected]
2020
Learning Outcomes 2
Characteristics of computers:
Assist human tasks
????
High speed
Large storage
Precise and accurate
Computers are sophisticated devices that cannot
think on its own (for now).
Algorithms are being developed for machine learning
and artificial intelligence.
These algorithms also need to be designed by humans.
Nature of a Computer Program 5
Do my homework. ???
Categories of Programming Languages 6
Programming Language
A set of instructions consisting of rules, syntax, numerical and logical operators and
utility functions.
3 major groups of programming languages
Machine language
Assembly language
High level language #include <iostream>
using namespace std;
int main()
{
cout << “Hello World!” << endl;
}
What is machine language? 7
An assembly language must be translated into machine language in order for the
computer to understand it.
A special program called an assembler is used for translation.
What is high-level language? 9
Which one do you think will run quicker, an interpreted or compiled program ?
Importance:
Maintain understandable and readable computer code
Describe and reveal the logical structure of instructions
Formatting guide:
Indentations
Include comments
Standardized naming conventions
Indentations 18
int main()
{
//Print out a welcome message.
cout << “Hello World!” << endl;
cout << “This is a simple C++ program.” << endl;
int y;
Ensure that variable names are easy to read and easy to distinguish.