Answers To End of Chapter 7 Activities and Questions
Answers To End of Chapter 7 Activities and Questions
Practice question – 1:
Practice question – 2:
highest = 0
total = 0
for exam = 1 to 8
input mark
highest = mark
next exam
average = total/8
output average
next student
output highest
highest = -100
lowest = 100
total_year = 0
for c = 1 to 365
total_day = 0
NPS International School
for d = 1 to 10
input temp
total_day = total_day + temp
total_year = total_year + temp
if temp > highest then
highest = temp
if temp < lowest then
lowest = temp
next d
average_day = total_day/10
print average_day
next c
average_year = total_year/3650
print highest, lowest, average_year
smarket1 = 0: smarket2 = 0
smarket1 = smarket1 + 1
smarket2 = smarket2 + 1
difference = - difference
largest = difference
next item
Practice question – 3:
Practice question – 4:
density = population/area
next country
Repeat..Until& WHILE
correct loop ( repeat .... until n = 500, while n <> 500 do ....)
NPS International School