how would i be able to write a function module for average from this pseudo-code and then use it to write an algorithm.

Sum integer
Num integer
Count integer
Count:= 0
Sum:=0
Dowhile count <3
Println “Enter Num: ”
Read Num
Sum := Sum + Num
Count:= count + 1
ENDDO
Println “average = ”, Sum/Count

To convert the given pseudo-code into a function module for calculating the average, you can follow these steps:

Step 1: Define the function module and provide it with an appropriate name, such as "calculateAverage".

Step 2: Declare three variables inside the function module: "Sum" as an integer, "Num" as an integer, and "Count" as an integer.

Step 3: Initialize "Sum" and "Count" variables to zero (0) at the beginning of the function module.

Step 4: Implement a loop using a do-while construct to iterate three times (as given in the pseudo-code).

Step 5: Inside the loop, prompt the user to enter a number using "Println" and read the input using "Read Num".

Step 6: Update the sum by adding the input number to the "Sum" variable.

Step 7: Increment the "Count" variable by 1.

Step 8: After the loop ends, calculate the average by dividing "Sum" by "Count".

Step 9: Finally, print the result using "Println" with the message "average =", followed by the calculated average.

Here is the algorithm based on the pseudo-code:

Algorithm calculateAverage():
// Declare variables
Sum integer
Num integer
Count integer

// Initialize variables
Count := 0
Sum := 0

// Loop for three times
Do While Count < 3
Println "Enter Num: "
Read Num
Sum := Sum + Num
Count := Count + 1
End Do

// Calculate average
Average := Sum / Count

// Print the result
Println "average =", Average

To use this algorithm, you can call the function module "calculateAverage()" from your program or script. It will prompt the user to enter three numbers, calculate their average, and display the result.