muhammadrafilakhani
muhammadrafilakhani muhammadrafilakhani
  • 19-12-2020
  • Computers and Technology
contestada

Python program which squares all the number in list number = [2,3,4,5,6,7,8,9] and store it in another list name square. Please write a program :|

Respuesta :

th3g3ntl3man
th3g3ntl3man th3g3ntl3man
  • 19-12-2020

Answer:

l = [2,3,4,5,6,7,8,9]

def solve(l):

for i in l:

print(i**2)

solve(l)

Explanation:

loops through each element of the list and squares it.

Answer Link

Otras preguntas

What is an "apt comparison"?
Exposure to UV light stimulates the skin to produce which vitamin? a. A b. B c. C d. D
A toaster oven uses 67,500 joules of energy in 45 seconds to toast a piece of bread. What is the power of the oven?
How do you do transversal of parallel lines??
Write an algebraic expression for 91 more than the square of a number
Cos A = square root 21 divided by 5 and sin A = 2/5. What is the exact value of cos 2A?
how to find the diagonals of a parallelogram?
60% of what number is 12 ?
express the indicated likelihood  as a probability values between 0 and 1.question: Ben Franklin said that death is a certainty of life
An oscillator makes 360 vibrations in 3 minutes. a. How many vibrations does it make in one minute? b. How many vibrations does it make in one second? c. What i