bananaa22 bananaa22
  • 26-02-2021
  • Computers and Technology
contestada

Given a list of numbers, use a while loop to print the square of each element in python.
Start of with: list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
ILL GIVE 50 POINTSSS

Respuesta :

Ultrabeast5121
Ultrabeast5121 Ultrabeast5121
  • 26-02-2021

Answer:

list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

counter = 0

lenlist = len(list) - 1

while counter < lenlist :

num = list [lenlist]

squ = num * num

print (squ)

counter += 1

Explanation:

as it goes through the list, it takes the element with that index and squares it, printing the squared number. it then increments the counter and starts again with the next element in the list.

Answer Link

Otras preguntas

The Caravel ship, sextant, and are inventions related to sea navigation A. printing press B. plow C. wagon D. compass
WILL GIVE BRAINLIEST TO WHOEVER CAN SHOW THEIR WORK: .8900mm to km
PLEASE HELP I WILL MARK YOU BRAINIEST PLEASE At their last babysitting gig, Zainab made $44 for 8 hours of work and Keziah made $47.25 in 9 hours. Each girl cha
On the real number line, point E is at –18 and point F is at –9. What is the distance between point E and point F ?
Where is the cell wall located
Write 7.12 as a mixed number in simplest form.
Explain why Yemen is experiencing a food security issue
What is this ??Answer this question​
True or false: the largest planet in the solar system is saturn
Is NAFTA a good idea for the United States