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

Which sentence has the correct use of a semicolon? a. Since you asked my opinion; I will tell you and I hope you will listen well. b. Carl is tall; his brother
Leon’s goal was to save $100 in a year, but he saved $120.What percent of his goal did he reach?
What is the sum of the probabilities of the favorable outcomes and the unfavorable outcomes, p(x=1)+p(x≠1)p(x=1)+p(x≠1)?
As you read through an essay for your history class, you encounter a number of unfamiliar words. Which is a good active reading strategy for helping you read th
A swimming pool measures 35 feet wide by 50 feet long. What is the ratio of the length to the perimeter in simplest form? Perimeter = 2(Length + Width)
Which condition is essential for the formation of a standing wave?
The capacity of a tiny kitty pool is 1/4 liter. How many tiny kitty pools can 2 liters of water completely fill?
I thought it was the second one
Any two people are likely to see and describe the same object, place, or event _______. a. the sameb. in a specific orderc. differentlyd. equally
when multiplying 4.73 by 2.1 how many decimal places will the product have