subject

Write a function named square_list that takes as a parameter a list and replaces each value with the square of that value. It should not return anything - it should mutate the original list. For example, if the original list is

[7, -3, 12, 9]
then after calling the function it should be

[49, 9, 144, 81].

Code must be in python, not C++ or Java.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
Which of the following statements tests if students have a grade of 70 or above, as well as fewer than five absences? a: if(grade > = 70 and daysabsent < = 5): b: if(grade > = 70 or daysabsent < = 5): c: if(grade > 70 and daysabsent < = 5): d: if(grade > 70 or daysabsent < = 5): i took the test the answer is a
Answers: 1
question
Computers and Technology, 22.06.2019 17:40
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Could you find out how im still getting an 83 percent on this in edhesive a = input("enter an animal: ") s = input ("enter a sound: ") e = "e-i-e-i-o" print ("old macdonald had a farm, " + e) print ("and on his farm he had a " + a + "," + e) print ("with a " + s + "-" + s + " here and a " + s + "-" + s + " there") print ("here a " + s+ " there a " + s) print ("everywhere a " + s + "-" + s ) print ("old macdonald had a farm, " + e)
Answers: 2
You know the right answer?
Write a function named square_list that takes as a parameter a list and replaces each value with the...
Questions
question
Mathematics, 08.12.2020 18:00
question
English, 08.12.2020 18:00
question
Arts, 08.12.2020 18:00
question
Mathematics, 08.12.2020 18:00
question
Mathematics, 08.12.2020 18:00
question
Mathematics, 08.12.2020 18:00
question
Arts, 08.12.2020 18:00
Questions on the website: 13722367