You are on page 1of 2

A file is a collection of records

A record is a data structure consisting of a number of fields which can all be of


different types
A field is a single item of data in a record
2 a. write to a new file
b. append mode
c. read mode (?)
3.to define what the structure looks like and then define variables with this structure
Abstraction in computer science is the process of removing physical, spatial, or temporal
details or attributes in the study of objects or systems to focus attention on details of greater
importance

Decomposition is one of the four cornerstones of Computer Science. It involves


breaking down a complex problem or system into smaller parts that are more
manageable and easier to understand. The smaller parts can then be examined and
solved, or designed individually, as they are simpler to work with.

MOD: modulus, the remainder left over when a number is divided by another.
DIV: integer division is used to find the quotient after division

Variables are a key element of programming. They are used for calculations, for
storing values for later use, in decisions and in iteration.

Diamond is used for any decisions for example if statement and loops

Rectangle is used for calculations

Parallelograms are used for user input and outputs

Oval are used to start and stop/end a flowchart

If is a SELECTION statement

For is ITERETION

iterations are useful since iteration allows algorithms to be simplified by stating that
certain steps will repeat until told otherwise. This makes designing algorithms
quicker and simpler because they don’t need to include lots of unnecessary steps.

Purpose of selection: A selection is used to make choices depending on information.


An algorithm can be made smarter by using IF, THEN, and ELSE functions to
reiterate instructions, or to move the process in question to different parts of
the program. Selection is also called a decision.
OUTPUT “ please input your identity”

id<- USERINPUT

WHILE is ID already used output “ choose another ID”

ELSE store ID

END WHILE

1. Total  0
2. FOR i  1 to 7
3. maxTEMPERATURE USERINPUT
4. total total + maxTemperature
5. If i =7 THEN
6. averageWeeksTemp  total/ 7 ELSE OUTPUT “add next day’s temperature”

7. OUTPUT "This week's average is ", averageWeeksTemp 

You might also like