193k views
0 votes
Find the error in the following preudocode.Constant Real GRAVITY = 9.81 Display "Rates of acceleration of an object in free fall:" Display "Earth: ", GRAVITY, " meters per second every second." Set GRAVITY = 1.63 Display "Moon: ", GRAVITY, " meters per second every second."

1 Answer

5 votes

Answer:

It is attempting to change the value of a constant.

Step-by-step explanation:

In this pseudocode program "GRAVITY" is declared as a constant value, therefore it cannot be changed during runtime. If you tried mo write this code in a real language and compile it you would get a compilation error because of that forbidden operation.

User Hamish Carpenter
by
5.9k points