You are on page 1of 1

LAB TASK 4

Complete the task during your designated lab session.

Part 1
Revise your code in Lab Task 3. Instead of using for loop, modify your
code to use while loop. This part will not take you long. You can complete
in half an hour.

Part 2
There are some repeating commands such as calculation of CO/PO and
analysis of CO/PO attainment in the programme you developed in Lab
Task 3. Your programme can be simplified by creating functions that
delivers the purpose and call the functions in your script. 

I have demonstrated to you few weeks ago on how to create function and
how function works.

For Part 2, create two functions:


1. calculate CO/PO,
2. analyse CO/PO attainment.

Call the functions in your script to condense your code and algorithm you
developed last week.

      
Submission
1. Script files of part 1 and part 2 separately. Put your name and student
ID (eg. mike_999999_part1.m mike_999999_part2.m
mike_999999_function1.m mike_999999_function2.m).
Submit to ech3119.2020@gmail.com at the end of lab session.
2. Copy and paste your code of Part 1 and Part 2 in single Word file.
Use Keep Source Formatting. Put your name and student ID
(mike_999999.docx). Upload to Turnitin under Lab Task 4. Turnitin
will be locked on Thursday 19 March 2020 11.59 pm.
3. Flowchart for Part 2 only. Your flowchart this time will be
condensed, more linear and tidier in comparison to Lab Part 3. Treat
the two functions that you developed as black box. There is no need
to draw the process for each loop. Submit to my office.

You might also like