minhnhatphan
minhnhatphan minhnhatphan
  • 18-03-2022
  • Computers and Technology
contestada

how do i multiply a loop (python)
I have x = [200, 300, 4, 125]
those are variables in x

y = 25

so how do I multiply y by each variable in x

Respuesta :

ExpertAlternative ExpertAlternative
  • 18-03-2022

Answer:

x = [200, 300, 4, 125]

y = 25

for item in x: Iterate over a_list.

y = y * item. multiply each element.

print(y)

Explanation:

Answer Link

Otras preguntas

What is the partial pressure of argon gas in a sealed vessel that has a total pressure of 1514 psi and partial pressures of 325 psi for oxygen and 649 psi for n
When a 10.00 mL sample of a hydrochloric acid is titrated, 22.50 mL of 0.250 M NaOH solution is required to reach the end point. What is the acid concentration
The Northwest Territory included all of the following areas except
1.   In "A White Heron," how does Sarah Jewett portray Sylvia's attitude about money?        A. Sylvia was once rich and has now fallen on hard times.   B.
how to order fractions with different dominators
6t^2-5.4-3.5t+2.5t^2+3t simplify the expression
How many neutrons are there in the following atom?
Who ran against Lincoln in the presidential election of 1864
The americans with disabilities act of 1990 requires companies to:
50= -6x + 4x-8 A.15 B.-15 C 29 D-29 solve the equation for X