MODULE 2: FUNDAMENTALS OF PROGRAMMING

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/33

flashcard set

Earn XP

Description and Tags

Fundamentals of Programming

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

34 Terms

1
New cards

ALGORITHM

  • Set of instructions to perform a specific task

  • Well-defined step-by-step solution

2
New cards

FLOWCHART

graphical representation of an algorithm

3
New cards

PSEUDOCODE

method of describing algorithms using combination of natural language and programming language

4
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Terminal Box</strong></span></p>

Terminal Box

Used to represent the beginning (Start) or the end (End) of a task

5
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Flow Line</strong></span></p>

Flow Line

Used to connect symbols and indicate the flow of logic

6
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Initialization Box</strong></span></p>

Initialization Box

Used to declare beginning value

7
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Input/Output</strong></span></p>

Input/Output

  • Used for input and output operations

  • Data to be read or printed are described inside

8
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Processing</strong></span></p>

Processing

  • Used to connect symbols and indicate the flow of logic

  • Indicates any type of calculation

9
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Decision Box</strong></span></p>

Decision Box

  • Used for any logic or comparison operations

  • Path chosen depends on whether the answer to a question is “yes” or “no” or “True” or “False”

10
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Pre-defined process</strong></span></p>

Pre-defined process

Marker for another process step or series of process flow steps that are formally defined elsewhere

11
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>On-page connector</strong></span></p>

On-page connector

Allows flowchart to be continued on the same page

12
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Off-page connector</strong></span></p>

Off-page connector

Allows the continuation on other pages

13
New cards

START AND END OPERATION

Signifies the start and end of the flowchart

<p><span style="font-family: Roboto, sans-serif">Signifies the start and end of the flowchart</span></p>
14
New cards
<p></p>

VARIABLE DECLARATION

15
New cards
term image

INPUT OPERATIONS

16
New cards
term image

OUTPUT OPERATIONS

17
New cards

Standard Arithmetic Operators

  • + (plus sign) – addition

  • - (minus sign) – subtraction

  • * (asterisk) – multiplication

  • / (slash) – division

  • % (modulo) - remainder

    • Returns the remainder of a division operation

18
New cards

Rules of precedence

  • Also called the order of operations

  • Dictate the order in which operations in the same statement are carried out

  • Expressions within parentheses are evaluated first

  • Multiplication and divisionare evaluated next (from left to right)

  • Addition and subtraction are evaluated next (from left to right)

19
New cards
<p><span style="font-family: Poppins, sans-serif"><strong>SEQUENTIAL OPERATION</strong></span></p>

SEQUENTIAL OPERATION

  • Sequential is very simple design.

  • It does not involve conditional or iterative processing

  • Design in this types is normally from top to bottom or left to right

20
New cards
<p><span style="font-family: Poppins, sans-serif"><strong>CONDITIONAL OPERATION</strong></span></p>

CONDITIONAL OPERATION

  • A step where a decision must be made

  • Ask questions and choose actions based on the available options

21
New cards

Boolean Expression

  • Value can be only true or false 

  • Used in every selection structure

22
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Dual-alternative</strong> (or <strong>binary</strong>) selection structure</span></p>

Dual-alternative (or binary) selection structure

Provides an action for each of two possible outcomes

23
New cards
<p><span style="font-family: Roboto, sans-serif"><strong>Single-alternative</strong> (or <strong>unary</strong>) selection structure</span></p>

Single-alternative (or unary) selection structure

  • Action is provided for only one outcome

  • If-then

24
New cards

Relational comparison operators

  • Six types supported by all modern programming languages, <, >, =, >=, <=, !=

  • Binary

  • Two values compared can be either variables or constants

25
New cards

Case Structure Operation

A more open convenient way to handle multiple selections or multiple alternative.

<p><span style="font-family: Arial, sans-serif">A more open convenient way to handle multiple selections or multiple alternative.</span></p>
26
New cards

Compound condition

Asks multiple questions before an outcome is determined

27
New cards

AND decision

  • Requires that both of two tests evaluate to true

  • Requires a nested decision (nested if)

28
New cards

nested if statements

  • Second selection structure is contained entirely within one side of first structure

  • else clause paired with last if

29
New cards

OR decision

  • Take action when one or the other of the two conditions is true

30
New cards

REPETITION  OPERATION

The loop mechanism causes repetition of a sequence of statement/s based on the given condition/s. Most of the time, when a body of the loop is executed, the value of at least one variable changed. Therefore, most loop mechanism has cumulative effect.

31
New cards

Counter

a variable used to determine number of loops

32
New cards

Accumulator

a variable use to store results of an iteration

33
New cards

FUNCTION CALL OPERATION

Depicts a sub-process or sub-routine

34
New cards