The program to calculate the square of 20 by using a loop
that adds 20 to the accumulator 20 times is given:
The Programaccumulator = 0
for _ in range(20):
accumulator += 20
square_of_20 = accumulator
print(square_of_20)
Algorithm:
Initialize an accumulator variable to 0.
Start a loop that iterates 20 times.
Inside the loop, add 20 to the accumulator.
After the loop, the accumulator will hold the square of 20.
Output the value of the accumulator (square of 20).
Read more about algorithm here:
https://brainly.com/question/29674035
#SPJ1