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 the sum of the measures of the interior angles of this polygon? A 5-sided figure. 270 degrees 450 degrees 540 degrees 900 degrees
List all of the countries and the year in which the United States acquired these territories while President McKinley was in office.
the size of a population can get larger with no influences from migration if birthrate_ or death rate_
PLEASE HELP, ASAP! PLEASE AND THANK YOU!
[tex]a^{x+2} +b=c[/tex] What would the equation need to be to have zero, and one solutions? PLEASE !!!!!
Simplify each expression 64 1/2
Read the following paragraph and answer the question below. 1Wuthering Heights is in the midst of the desolate English moors. 2Outside the gates of this solitar
Question 7 Read the sentence from a magazine advertisement. After my doctor recommended Power Now, I drank it every morning for two weeks, and my energy returne
True or False: A cracked windshield and a dislodged hood that flies up are examples of situations in which a driver can experience loss of forward vision.
What occurred during the détente era?