matthew267 matthew267
  • 07-12-2021
  • Computers and Technology
contestada

Write a python program to calculate the sum of three numbers and as well require the user to input the numbers.​

Respuesta :

tonb
tonb tonb
  • 07-12-2021

Answer:

numbers = []

for i in range(3):

 numbers.append(eval(input("Enter number: ")))

print('Sum is:', sum(numbers))

Explanation:

You want to use a loop to prevent repeating your code.

Answer Link

Otras preguntas

Which is between 16 and 32 ounces?
How did the domino theory push the U.S. into Vietnam?
Help please!!!!!!!!!!!!!!!!!!
Kingdom of organisms which are heterotrophic and have chitin cell walls
The price of a table is $360 if the price is reduced by 20% what is the price of the table after the discount
The submarine is 217 feet below sea level. Identify the integer that represent the opposite of its location and its absolute value.
Choose the correct response to the question given. 1. ¿Cuándo vienes a la universidad? a. Vengo a la universidad por la mañana. b. Tengo cuatro clases en la un
The system px +qy =r; fx + gy = h has solution(3,-1), where f,g,h,p,q, and r are nonzero real numbers. select all the systems that are also guaranteed to have t
The formula h(t) -16 + vt + h, is the projectile motion formula, where h(t) represents height at a given time, t represents time, v represents velocity, and he
Which plant is nonvascular? I didn't see an option for science so I chose math :^