0% found this document useful (0 votes)
23 views1 page

Algorithm Design Lab Activity Guide

The document outlines a lab activity for CSC121 focused on algorithm design, requiring students to create pseudocode and flowcharts for four problems. These problems involve calculating costs for a vending machine purchase, finding the perimeter and area of a rectangle, applying a coupon for a food delivery service, and calculating discounts for hair salon services. The activity emphasizes practical applications of algorithms in various scenarios.

Uploaded by

2023140563
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

Algorithm Design Lab Activity Guide

The document outlines a lab activity for CSC121 focused on algorithm design, requiring students to create pseudocode and flowcharts for four problems. These problems involve calculating costs for a vending machine purchase, finding the perimeter and area of a rectangle, applying a coupon for a food delivery service, and calculating discounts for hair salon services. The activity emphasizes practical applications of algorithms in various scenarios.

Uploaded by

2023140563
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

LAB ACTIVITY 2: INTRODUCTION TO ALGORITHM DESIGN CSC121

OCT 2022

Instructions: From last week activity, draw a pseudocode and flow chart for each problem.

PROBLEM 1

Amelia wants to buy a can of Coke from a vending machine cost. The drink cost RM2.20.
The vending machine only take coins as payment. Amelia has 3 x 50cents coins and 4 x
20cents coins.

PROBLEM 2

Find the perimeter and area of a rectangle. The perimeter and area of the rectangle are
given by the following formulas:

Perimeter = 2 * (length + width)


Area = length * width

PROBLEM 3

Customer is eligible for free delivery coupon for first food order from UberPanda app. To
apply the coupon, customer need to type ‘THANKYOU’ on the promo column before
checkout.

PROBLEM 4

A muslimah hair salon is celebrating their 10th year anniversary. The owner decided to offer
15% discount for some hair styling services. For membership promo, customers will get
additional 10% discount. Below are price for the promotional services:

 Scalp treatment : RM60


 Rebonding : RM100
 Manicure & Pedicure : RM50

You might also like