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
Studentka2010 [4]
3 years ago
10

The function below takes one parameter: a list of numbers (num_list). Complete the function to return a new list containing only

the negative numbers from the original list. For this question, you'll first want to create an empty list. Then, you'll want to visit every element of the original list checking to see if it is negative. For the negative elements, you'll append them to your new list. Finally, return the new list.
Computers and Technology
1 answer:
agasfer [191]3 years ago
6 0

Answer:

Following are the program in the Python Programming language.

#define function

def negative_num(num_list):

 #set list type variable

 nlist=[]

 #set the for loop

 for n in num_list:

   #check negative numbers

   if(n<0):

     #add the value of n in list

     nlist.append(n)

 #return list

 return nlist

#set new list type variable that store list

newl=[-5,8,-6,3,-4,9,-7]

#print and call the function

print(negative_num(newl))

<u>Output</u>:

[-5, -6, -4, -7]

Explanation:

Here, we define the function "negative_num" and pass an argument "num_list" in its parameter and inside the function.

  • Set new list data type variable "nlist".
  • Set the for loop which iterate as the list.
  • Set the if conditional statement to check the value of the list is less than 0 then, add that negative values in the variable "nlist".
  • Then, return the new list.

Finally, we set a variable "newl" which store the list of negative and positive numbers then, we print and call the function.

You might be interested in
Convert each of the following for loops into an equivalent while loop. (You might need to rename some variables for the code to
MAVERICK [17]

Answer:

~CaptnCoderYankee

Don't forget to award brainlyest if I got it right!

Download txt
5 0
3 years ago
Answer for 3.4.8 rectangle code HS
tigry1 [53]

Answer:

i think Make variables to represent the length and width of a rectangle, called length

and width

, respectively. You should set length

to 10 and width

to 5.

Then, write some mathematical expressions to computer the area and perimeter of the rectangle and save these values inside variables named area and perimeter

.Use print

statements to display the area and perimeter of the rectangle.

Your output should print the area on the first line and the perimeter on the second, like this:

50 30  Rectangle Area Formula:

Area = L * W

Explanation:

7 0
3 years ago
You connect your computer to a wireless network available at the local library. You find that you can access all of the websites
leva [86]

Answer:

There must be a  proxy server that is not allowing access to websites

Explanation:

A wireless network facility provided in colleges, institutions, or libraries is secured with a proxy server to filter websites so that users can use the network facility for a definite purpose. Thus, that proxy server is not allowing access to all of the websites to the user on the internet except for two.

4 0
2 years ago
Consider a situation where we have a file shared between many people.  If one of the people tries editing the file, no other pe
Sergeu [11.5K]

Explanation:

I am a collection of this process from Trash on the computer system and the program that included a new twist on the computer and the skin that appears after loading and the Windows operating system it was much that appear on identifying long horizontal bar at the bottom of the screen and water pollution and its control car parts of the computer with enough letters and adware if for the collection of the fat calculation in the complete committee that in the water method is a product of a screensaver been disciplined displayed at the subject of the right click an icon To Number Sau new file getting opened on you can getting opened on a forgiving of an operational effectiveness of the program is a false false false

7 0
3 years ago
A software-based _________ is dedicated to examining and blocking internet traffic.
igomit [66]

A software-based <u>Firewall</u> is dedicated to examining and blocking internet traffic.

7 0
3 years ago
Read 2 more answers
Other questions:
  • The _____ contains a series of sections designed to prepare students for the ACT
    14·2 answers
  • What is a fragment shader? Question 5 (3 marks) What is trilinear filtering?
    8·1 answer
  • The goal expressed in this definition states that data visualization is about ______ . 1. Interpreting 2. Perceiving 3. Facilita
    6·1 answer
  • Which amendment to the Constitution ended slavery in the United States?
    8·1 answer
  • Implement a program that manages shapes. Implement a class named Shape with a method area() which returns the double value 0.0.
    15·1 answer
  • Sum of 18/7 and 13/7 is *​
    14·2 answers
  • To configure a router/modem, what type of IP interface configuration should you apply to the computer you are using to access th
    10·1 answer
  • 7 steps in infographic design​
    6·1 answer
  • I need so much help, can anyone please help me?
    15·1 answer
  • Question #8
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!