PP1 - Seat Work Exercises - Algorithm (Dagdag)
PP1 - Seat Work Exercises - Algorithm (Dagdag)
Direction:
Write your activity in a bond paper, use MSWord, or in one sheet yellow paper
You may also create a flowchart using online flowchart generator
For those who used bond paper or yellow paper, take a picture of it and upload it on
canvas.
For those who used MS. Word or flowchart generator uploads the file on canvas.
File naming convention is: PrelimP1
Submit your activity in canvas
1. Given the value of the password is “JRU”, write an algorithm that if the user input the correct
password, it will display “Password is Accepted” if not “Password is Incorrect”
2. Write an algorithm that will input the value of money in Peso denomination and output its
equivalent in Dollars. Conversion factor: 1 dollar = 49.59 peso.
Answer: PROBLEM #1
Step 1: START
Step 2: INPUT PASSWORD
PASSWORD = JRU
Step 3: READ PASSWORD
Step 4: IF (PASSWORD = JRU) THEN
PRINT “PASSWORD IS ACCEPTED”
Else
PRINT “PASSWORD INCORRECT”
Step 5: END
ANSWER: PROBLEM #2
Step 1: START
Step 2: READ MONEY AS PESO (PHP)
Step 3: USD = 49.59 PHP
Step 4: PRINT MONEY IN DOLLARS (USD)
Step 5: END
ANSWER: PROBLE #3
Step 1: START
Step 2: NUMBER = 5
NUMBER = NUMBER +1
Step 3: WHILE NUMBER <= 5
Step 4: DISPLAY NUMBER
Step 5: END