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

did Pericles claimed that the Athenian government, unlike other Greek city-states, favored its wealthy citizens. kept poor people from serving the state. imita
Sammy puts his toys into boxes. He put 250 toys equally into 5 boxes. How many toys did each box have?
The _______ form of city government merges executive and legislative functions in a single group of officials.
Identify two different habitats in a prairie ecosystem.Name one organism found in each habitat.
Which of the following helps build dramatic tension and make the reader wonder what the outcome of the trial will be? a. Heck Tate’s expression as the jury retu
I really need help please the c/4 is a fraction 85+c/4=99
Slum areas called shantytowns occur in _________ major African cities, housing over _________ percent of urban populations. A. all; 70 B. some; 40 C. five major
why cooking pans don't have have metal handles?
the rule for converting gallons into quarts
A rebellion of debt-ridden farmers was led by: Patrick Henry Daniel Shays Daniel Webster Peter Zenger