Professional Documents
Culture Documents
01 Pseudocode
01 Pseudocode
Pseudocode
with Sir Beets
Raise of Hands
Icebreaker
Pineapples should go with pizza.
X Y S Ave
Variables are holders of values
5 7 12 6
3.14 88
6 8 14 7 “Juan Carlos”
9 4 13 6 ’C’
Integer Division Float Division
operands are integers and the operands are real numbers and
quotient is an integer the quotient is a real number
2. Alternation (Conditional)
Three Types of Two sequences of statements may form alternatives so that only 1 of
the alternative is executed
Statements Problem 2: Even or Odd
3. Iteration
A sequence of statements may be executed repeatedly, zero or more
times (zero meaning execution may be omitted altogether)
Repeating Statements
Version 1
1. Sing “Amen” Sing Amen 3 times
2. Sing “Amen”
3. Sing “Amen”
1. Y=1
Version 2
Repeating 2. While ( Y <= 3 )
1. Sing “Amen”
Statements 2. Repeat Step 1 two more
2.1 Sing “Amen”
2.2 Y = Y + 1
Iteration times
Version 3
1. Repeat 3 times
1.1 Sing “Amen”
Display the all positive even integers from N to 0.
1. Input N
2. Y = N
Practice 3. While ( Y >= 0 )
3.1 If ( Y % 2 == 0 )
3.1.1 Then display Y
3.2 Y = Y - 1
12 10 8 6 4 2 0
Look for things that involves mathematical
computation
1. Receipt
2. Price tags with discount
On Your Own 3. GCF and LCM