QUESTION #1:

SOLUTION:
WoodType[1] ← "Laminate"
WoodType[2] ← "Pine"
WoodType[3] ← "Oak"
Price[1] ← 29.99
Price[2] ← 39.99
Price[3] ← 54.99
FOR count ← 1 TO 100
OUTPUT "Enter the name of customer ", cust
INPUT Customer[count]
OUTPUT "Enter length of the room"
INPUT length
WHILE length < 1.5 OR length > 10
OUTPUT "Please re-enter the length between 1.5 and 10.0"
INPUT length
ENDWHILE
Quotations[count][1] ← ROUND(length, 1)
OUTPUT "Enter the width of the room"
INPUT width
WHILE width < 1.5 OR width > 10
OUTPUT "Please re-enter the length between 1.5 and 10.0"
INPUT width
ENDWHILE
Quotations[count][2] ← ROUND(width, 1)
Area ← Quotations[count][1] * Quotations[count][2]
Quotations[count][3] ← ROUND(Area, 0)
OUTPUT "Enter your choice of wood: (1-Laminate, 2-Pine, 3-Oak)"
INPUT WoodChoice
WHHILE WoodChoice < 1 OR WoodChoice > 3
OUTPUT "Wood type must be 1,2 or 3, Please re-enter"
INPUT WoodChoice
ENDWHILE
Quotations[count][4] ← WoodChoice
CASE Choice OF
1: TotalPrice ← Quotations[count][3] * Price[1]
2: TotalPrice ← Quotations[count][3] * Price[2]
3: TotalPrice ← Quotations[count][3] * Price[3]
ENDCASE
Quotations[count][5] ← ROUND(TotalPrice, 2)
#Final output of quotation details
OUTPUT "Name of the customer:", Customer[count]
OUTPUT "Type of the wood selected:", Quotation[count][4]
OUTPUT "Total coast of wood:", Quotation[count][5]
OUTPUT "Do you want to enter another customer's details (y/n)"
INPUT ch
IF ch = 'n' OR ch = 'N' THEN
BREAK
ENDIF
NEXT count
QUESTION #2:

SOLUTION:
LowestMin ← 11000
FOR count ← 1 TO ClassSize
StudTotalMin ← 0 #Initilise total screen time for a student
DayCount ← 0 # DayCount stores the number of days with more than 300 min
OUTPUT "Input the screen time for ", StudentName[count]
#Inputing screentime for the past week
#and calculating total min for student
FOR day ← 1 TO 7
OUTPUT "Enter screen time (in minutes) for Day", Day
INPUT ScreenTime[count][day]
IF ScreenTime[count][day] > 300 THEN
DayCount ← DayCount + 1
ENDIF
StudTotalMin ← StudTotalMin + ScreenTime[count][day]
Next day
ClassTotalMin ← ClassTotalMin + StudTotalMin
IF StudTotalMin < LowestMin THEN
LowestStudIndex ← count
ENDIF
#Outputting details of the student
hr ← StudTotalMin DIV 60
min ← StudTotalMin MOD 60
OUTPUT "Name of the student:", Studentname[count]
OUTPUT "Total screen time for the week:", hr, "hours", min, "minutes"
OUTPUT "Number of days with more than 300 minutes:", DayCount
NEXT count
ClassAverage ← ClassTotalMin / ClassSize
OUTPUT "Average weekly screen time for the whole class ", ClassAverage
OUTPUT "Student with lowest weekly screen time ", StudentName[LowestStudIndex]
