Serenaark6707 Serenaark6707
  • 02-07-2021
  • Computers and Technology
contestada

Write code using the range function to add up the series 3, 6, 9, 12, 15, ..... 66 and print the resulting sum. Expected Output 759

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 08-07-2021

Answer:

The program is as follows:

total = 0

for i in range(3,67,3):

   total += i    

print(total)

Explanation:

This initializes the sum of the series to 0

total = 0

This iterates through the series with an increment of 3

for i in range(3,67,3):

Add up all elements of the series

   total += i

Print the calculated sum    

print(total)

Answer Link

Otras preguntas

I am doing an oral reading report and i need a "nonfiction" short story that has "-" when the characters speak ​
please help 50 points Factor the expression completely over the complex numbers. y^4+14y^2+49
Audacity is blank program that is free to download and is used by tens of millions of people worldwide.
What are the solutions to the quadratic equation 5x2 + 60x = 0? A.) x = 0 and x = −12 B.) x = 0 and x = 12 C.) x = 5 and x = −12 D.) x = 5 and x = 12
Please help me, I'll give brainlest
HELP ME PLEASE!!!!!!!!!!​
What is the difference between training and development?...
Which game would be classified as an educational game?
Which group did the United States eventually side with in world war 1?
What is the area of the trapezoid? 168 square inches 192 square inches 44 square inches 64 square inches