1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marina86 [1]
3 years ago
7

Q2 - Square Everything (0.25 points) Write a function called square_all that takes an input called collection that you assume to

be a list or tuple of numbers. This function should return a new list, which contains the square of each value in collection. To do so, inside the function, you will define a new list, use a loop to loop through the input list, use an operator to square the current value, and use the append method to add this to your output list. After the loop, return the output list.g
Computers and Technology
1 answer:
SVEN [57.7K]3 years ago
4 0

Answer:

See explaination

Explanation:

#Define the function square_all() having a list of

#integers. This function will return a list of square

#of all integer included in the given list.

def square_all(num_list):

#Create an empty list to store resultant list.

sq_list = []

#Start a for loop till the length of the given list.

for index in range(0, len(num_list)):

#Multiply the current list value with its value

#and append the resultant value in the list

#sq_list in each iteration.

sq_list.append(num_list[index] * num_list[index])

#Return the final list of squares of all integrs in

#the list num_list.

return sq_list

#Declare and initialize a list of integers.

intList = [2, 4]

#Call the function square_all() and pass the above list

#as argument of the function. Display the returned list.

print(square_all(intList))

You might be interested in
Individuals who break into computer systems with the intention of doing damage are called​ _____________.
notka56 [123]
I think the answer is hackers
7 0
3 years ago
Suggest a reason why it was constructed there?​
valina [46]
Can you post the work assigned so I can better understand?
6 0
3 years ago
Choose all the answers that apply.
Paraphin [41]

When coal is burned it releases, 2: Carbon Dioxide.

3 0
3 years ago
is an interviewing method in which a mall interviewer intercepts and directs willing respondents to nearby computers where each
geniusboy [140]

Answer:

computer-assisted self-interviewing

Explanation:

Based on the description of the interviewing method that is being provided, it can be said that this method is known as computer-assisted self-interviewing. Like mentioned in the question this is when interviewees answer the interview questions through a computer screen. This is similar to telephone interviews but it is instead through a computer.

3 0
4 years ago
Which of the following must the designer first do in order to create the software in the following scenario? A multimedia design
Vadim26 [7]
He must explore the components of VHS films so he knows what exactly needs to be done so he software functions property.


Hope it helped,

Happy homework/ study/ exam!
8 0
4 years ago
Read 2 more answers
Other questions:
  • To illustrate a point in a Word document with a simple chart, what command should you select
    6·2 answers
  • in c++, what happends when i add 1 to the RAND_MAX then take rand() deivded by (RAND_MAX+1)?if my purpose is to take out a rando
    11·1 answer
  • The actual database of Active Directory shared resources is stored on one or more computers designated as:
    6·1 answer
  • How do computers read zeroes and ones?
    7·1 answer
  • Consider the following code:
    13·1 answer
  • Write a program to prompt the user to enter a fist name, last name, student ID and GPA. Create a dictionary called Student1 with
    8·1 answer
  • ITING THE ANSWER
    9·1 answer
  • PROCEDURE: Therapeutic infusion of saline solution with 5% dextrose IV, 500 ml for dehydration, lasting 48 minutes. what is the
    13·1 answer
  • Jared is a corporate trainer who creates presentations to deliver at workshops. When creating these
    8·1 answer
  • What is a major advantage of medical simulators?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!