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

plate margins are places where much activity occurs. Earthquakes occur, for example, along convergent margins, where plates are\a.moving apartb.collidingc. slid
Many ranchers prefer cattle without horns. The presence or absence of horns is genetically determined. The allele for the absence of horns (A) is dominant to th
1 \frac{1}{6}y-8=6[/tex]    please explain how to do this
A stack of 10 quarters measures 17.5mm what is the height in centimeter
An RNA sequence is shown below. AUGCCGAAACGU Which of the following statements describes how the RNA sequence specifies the production of an amino acid chain? (
Who is pytheas family
what two sides emerged in response to the Declaration of independence? what did each Side favor?
There were 75 pebbles in boxes a, b and c. After moving 28 pebbles from a to b, 24 pebbles from b to c, and 19 pebbles from c to a, there was an equal number of
Find the area of the figure. Round decimal answers to the nearest tenth.
Many ranchers prefer cattle without horns. The presence or absence of horns is genetically determined. The allele for the absence of horns (A) is dominant to th