Pseudocode Practice
Write codes that fulfill the following requirements:
Difficulty Level: Easy
1. Ask the user for a name. After that, OUTPUT “Hello, (the name where the user has typed
in).
2. Create a variable call MEALCOST. Assign a value of 10 to it.
Then, create another variable call MEALSELLINGPRICE, which is twice the value of
MEALCOST.
Then, create another variable call TAX, which is 6% of the MEALSELLINGPRICE.
Lastly, create a variable call TOTALPRICE, which is the sum of MEALSELLINGPRICE and TAX.
---------------------------------- BADGE EARNED!! Current rank: Beginner --------------------------------Difficulty Level: Medium
3. DECLARE a dynamic array, named it as Y10CLASS, which will be used to contain a list of
names.
4. Design a program that asks a user to INPUT two numbers. The program will multiply the
numbers together (hint: you need to create a variable that stores the product). If the
product is larger than 100 it outputs the message “Greater than 100”. If not, it does nothing.
--------------------------------- BADGE EARNED!! Current rank: Amatuer --------------------------------
1
Pseudocode Practice
Difficulty Level: Hard
5. Tickets are sold for a concert at $20 each, if 10 tickets are bought then the discount is
10%, if 20 tickets are bought the discount is 20%. No more than 25 tickets can be bought in
a single transaction (hint: A while loop can be used for validation (eg. Ticket number cannot
be less than 1 or more than 25).
(Do not use CASE OF, use IF ... ELSE ... THEN instead)
You are asked to design a program that can automatically calculate the cost of the purchase.
Print out the cost. The program will keep repeating until a user INPUT a value “stop”. Write
the pseudocode for this program.
------------------------------------ LEVEL UP!! Current rank: Professional -----------------------------------
2
Pseudocode Practice
Standard methods of solution
1. Totaling
StudentMark [1:10]
70
75
80
60
70
65
75
90
95
100
65
75
90
95
100
Write the pseudocode to find the total mark:
2. Counting
StudentMark [1:10]
70
75
80
60
70
Write the pseudocode to find the number of students who pass (mark > 50) the exam.
3