0% found this document useful (0 votes)
5 views3 pages

ICT1402 Tutorial 05

The document outlines a tutorial for ICT 1402 at Rajarata University, focusing on pseudocode and algorithm development for various programming problems. It includes tasks such as generating student reports with grades based on average marks, calculating electricity bills for houses, creating a cashier system for a shop, printing specific shapes, and analyzing a list of phone bills. Each task requires analysis, a task list, and corresponding pseudocode and algorithms.

Uploaded by

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

ICT1402 Tutorial 05

The document outlines a tutorial for ICT 1402 at Rajarata University, focusing on pseudocode and algorithm development for various programming problems. It includes tasks such as generating student reports with grades based on average marks, calculating electricity bills for houses, creating a cashier system for a shop, printing specific shapes, and analyzing a list of phone bills. Each task requires analysis, a task list, and corresponding pseudocode and algorithms.

Uploaded by

iammsign
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Rajarata University of Sri Lanka

Department of Computing1.
2.
ICT 1402 - Principles of Program
3. Design and Programming
Tutorial 05

Write pseudocodes and algorithms for the following problems.

Your answers for each question should include analysis, task list and pseudocode and
algorithm.

1. Generate students repot as shown below.

Index Number Name Mathematics Physics Chemistry Total Average Grade

In this task list, for each student you must input marks of three subjects. Students’ grade is
determined according to following criteria:

 Average >= 90% : Grade A


 Average >= 80% : Grade B
 Average >= 70% : Grade C
 Average >= 60% : Grade D
 Average >= 40% : Grade E
 Average < 40% : Grade F

2. Assume a village has 20 houses. Input electricity unit charges and calculate total
electricity bill according to the following criteria:

 For first 50 units Rs. 0.50/unit


 For next 100 units Rs. 0.75/unit
 For next 100 units Rs. 1.20/unit
 For unit above 250 Rs. 1.50/unit
An additional surcharge of 20% is added to the bill

The output should be as follows:


Serial Number: House Address Units Surcharge Amount to be paid

1
3. Develop a cashier system for a shop.
Your system should display following prompt for the cashier and the entire program is
controlled according to the command given by the cashier.

Welcome to <shop name>

Press S  Start

Press Q  Quit

Once you press S: System will display welcome message and ready for processing a
bill by initializing required variables.
Once you press Q: You can shut down the cashier system.
Once you press P: Process the current customer’s shopping cart.

Here, you can enter the item code, qty, unit price of the items in shopping cart and
calculate and display the total.

Once you finished serving to the current customer, you can press N to move to the
prompt.

4. Print the following shapes.

* *******
** *******
*** *******
**** *******
***** *******
******

****** *
***** **
**** ***
*** ****
** *****
* ******

****** 1
***** 12
**** 123
*** 1234
** 12345

2
*

5. Print the following list.

person work mobile home

1 500 1000 300

2 10 1800 200

3 200 400 700

6. Find following using the above table separately.

i. Find the total cost need to pay.


ii. Find the total cost for each phone type.
iii. Who pays maximum bill for mobile phones?
iv. Who pays highest phone bill?
v. Who pays minimum phone bill?
vi. What is the total bill amount paid by person 3?

You might also like