0% found this document useful (0 votes)
30 views5 pages

Fundamentals of Computer Day 8

The document discusses key programming concepts like variables, data types, sequence, selection and iteration that are used to store and manipulate data as well as make decisions. It also explains operators, algorithms, characteristics of high-level languages, and how programming works by translating code through compilers and interpreters. The main programming structures are described as variables and constants to store data, different data types to classify information, and control structures like sequence, selection and iteration to determine program flow and logic.

Uploaded by

Iduni Hiranya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

Fundamentals of Computer Day 8

The document discusses key programming concepts like variables, data types, sequence, selection and iteration that are used to store and manipulate data as well as make decisions. It also explains operators, algorithms, characteristics of high-level languages, and how programming works by translating code through compilers and interpreters. The main programming structures are described as variables and constants to store data, different data types to classify information, and control structures like sequence, selection and iteration to determine program flow and logic.

Uploaded by

Iduni Hiranya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Day 8

Programming concepts
• In programming, most of the time everywhere you see the same programming concepts.
• Variables, data types, sequence, selection, iteration are some examples of those basic
concepts.
• In order to compare and manipulate data, and to make decisions in a program,
programmers use a variety of different logical, relational, and arithmetic operators.
• It is also useful to be able to generate randomness in a program, for example selecting a
random number or a random item from a list.

Data types
• It is a way how the data you enter get classified and therefore identified by the computer
program.
• Data types are of different types.
• Example: Integer, Character, String, Boolean, Float

Variables and constants


• Variable – a storage location identified by a memory address which can be changed and
capable of changing its value.
• Constant – storage location which is already containing a value in it. it will not change

Sequence, Selection, Iteration


• These are known as the 3 main control structures in programming.
• Most of the types the computer programs written are following these 3 structures within
them.
• Sequence – means order. When a program we code, in order to computerize certain daily
task(s), simply needs to follow a specific order without the need to make decisions we
say the control structure used is Sequence.
• Selection – means when given with choices where we need to select. This involves
decision making, we need to write the program for each choice as the decision is made by
the person who uses this program at a given time.
• Iteration – means to repeat. Whenever a set of code lines need to be repeated, or executed
several times where looping involves.
Operators
• Programming has types of operators. Arithmetic operators, comparison operators,
assignment operators, logical operators.
• These symbols are used to manipulate operands.
• Arithmetic – to perform mathematical operations
• Comparison / relational – to compare two operands
• Assignment – to assign values to variables, arrays
• logical – based on relations and comparison to provide logical outputs.

Algorithm
• It is a procedure used for solving a problem. It simply says how you arrive at a solution
for a given problem.
• Before we do actual coding / program writing, we need to see the algorithm.
• And it helps to do accurate program writing.
• Algorithms are created at the design phase, before programming.

High-level language characteristics


• Written in human communication languages
• Simple and easy to understand
• Easy to detect errors
• Machine independent

High-level language programming


• Programming is making computer programs as solutions by writing codes for problems.
• For that purpose, you need program writing languages which are known as programming
languages which can be separated as low-level and high-level.
• Low-level languages are machine readable means it is difficult for humans to understand,
whereas high-level languages act the opposite way.
• C, C++, Java, Python are examples.
How programming works
Programming features
• Simplicity: the language must offer clear and simple concepts that facilitate its learning
and application, in a way that is simple to understand and maintain. Simplicity does not
mean that it can be subtracted from the optimal power of functioning.
• Naturalness: this means that its application in the area for which it was designed must be
done naturally, providing operators, structures and syntax for operators to work
efficiently.
• Abstraction: it is the ability to define and use complicated structures or operations while
ignoring some details, which influences writing ability.
• Efficiency: Programming languages must be translated and executed efficiently so as not
to take up too much memory space or require too much time.
• Structuring: the language allows programmers to write their codes according to
structured programming concepts, to avoid creating errors.
• Compactness: with this characteristic, it is possible to express operations concisely,
without having to write too many details.
• Locality: refers to the codes concentrating on the part of the program with which you are
working at a given time.
Translation software
• Even though we write the computer programs using high-level languages, it is difficult in
terms of machines, for them to understand what is written.
• For that purpose, program translators or translation software are available.
• They can be identified as compilers and interpreters.
• Compilers – completely convert the program into machine code
• Interpreters – convert line by line into machine code

You might also like