10 LET K = 2 20 LET L = 9 30 LET SUM = 0 40 FOR J = K TO STEP 2 50 SUM = SUM + \(J^2\) 60 PRINT "ANSWER =", SUM 70 NEXT J 80 END Which of the following best...

Assessment: WAEC SSCE - Computer Studies - 2016 (Objective) Subject: Computer Studies

Question 1 Report

10 LET K = 2

20 LET L = 9

30 LET SUM = 0

40 FOR J = K TO STEP 2

50 SUM = SUM + \(J^2\)

60 PRINT "ANSWER =", SUM

70 NEXT J

80 END

Which of the following best represents the sequence of output from the program?

Which of the following best represents the sequence of output from the program?

Answer Details
The program is adding 2 to the square of each even number from 2 to 8 and printing the result. The even numbers from 2 to 8 are 2, 4, 6, and 8. The square of each of these numbers are 4, 16, 36, and 64 respectively. Adding 2 to each of these squares gives 6, 18, 38, and 66. Therefore, the program will output: 4, 18, 38, 66. The option that best represents this sequence of output is: 4, 20, 56, 120.

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning