Algorithm Workbench
Programming Exercises
3.)
Input:
- User is prompted to enter the lowest score.
- User is prompted to enter the highest score.
Process:
- Receive user inputs for lowest and highest scores.
- Calculate the average by summing lowest and highest, and then dividing by 2.
Output:
- Display the calculated average.
Declare Real lowest, highest, average
Display "Enter the lowest score."
- Input lowest
Display "Enter the highest score."
- Input highest
Set average = (lowest + highest) / 2
Display "The average is ", average, "."
Input:
- None explicitly, as the gravitational constants are predefined.
Process:
- Display the rates of acceleration for an object in free fall on Earth and the Moon.
- No input is taken in this part; it simply displays the constant value for Earth's gravity.
- Display the rate of acceleration for the Moon without modifying the constant.
Output:
- Display the rates of acceleration for an object in free fall on Earth and the Moon.
7.)
- Constant Real GRAVITY = 9.81
- Display "Rates of acceleration of an object in free fall:"
- Display "Earth: ", GRAVITY, " meters per second every second."
- Display "Moon: 1.63 meters per second every second." # Assuming you want to display the
Moon's gravity without changing the constant.