2009 U1 Q3

Part a

An algorithm is a well-defined, precise, finite set  of steps for solving a problem.[1]

Part b

Sequence (procedure), Selection (if-then-else) , Iteration (Looping)

Part c

Note:  j goes from 2,4,6,… 96,98 during looping and is output to the screen. Odd numbers are not output. See the attached flowgorithm file here:

https://drive.google.com/file/d/1H21gL4E0YGtgzXgwUD-1cFuEHsmC8IY0/view?usp=sharing

Image:

https://drive.google.com/file/d/1smeXp9ArthIPi7ZY1NfnJqJrYKIJx4rK/view?usp=sharing


Part C(i)

J = 100, C=50

Part c(ii)

2. J=1
3. C=1

Note, for this part we arrive at a solution that solves the problem exactly as stated (only numbers from odd numbers from 1 to 99 and the count.  See flowgorithm file for the corrected algorithm:

Flowgorithm file

Image

Displaying 2009Q3Cii.png




Part c(iii)

c=50

Part  d

Use “Start” instead of main.  See Files Below:

Flowgorithm

Image





[1] VK. Blogged at https://islandclass.wordpress.com/2020/02/10/what-is-an-algorithm-definition/

© 2021  Vedesh Kungebeharry. All rights reserved. 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s