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
What does using indirect quotations allow a writer to do?
Marrrta [24]
Indirect quotations can add information that strengthens your content in many of the same ways as direct quotations so. Essentially, indirect quotes carry the meaning of a speaker or writer's original words without using the exact words.
7 0
3 years ago
Read 2 more answers
How do I go to files in Brainly I need help
Lyrx [107]

Answer:

There should be a little icon at the bottom of your question box/answer box. It looks like a paper clip. click it and boom

Explanation:

4 0
3 years ago
To communicate with coworkers in the office
Elanso [62]

For effective communication to occur, everyone must trust and respect each other. ... Clear and concise communication will allow your colleagues to understand and then trust you. As a result, there will be more cooperation and less conflict in the workplace.

8 0
3 years ago
Which Internet Explorer security zone includes all Internet Web sites that are not specifically assigned to another zone?
Anna007 [38]

Answer:

Internet is the correct answer for the above question.

Explanation:

  • The Internet Explorer define some security zone (which includes the Restricted sites, internet, Trusted sites, and Local intranet) which is used to block the unwanted sites which can be opened by some other websites.
  • When any user use any website, sometimes that websites open different websites. This security zone gives the features to secure the user from this event.
  • There are four-zone which are described in the first line, in which the internet zone is used to take all the websites which are not defined for the other security zone. It means that when any user does not decide the security zone for any websites then by default it comes in the internet zone.
  • This is also asked by the question, Hence "internet" is the correct answer.
4 0
2 years ago
To conserve its public IP addresses, a company can instead use ____ addresses for devices within its own network boundaries.
Thepotemich [5.8K]

Answer:

private ip addresses

Explanation:

A private ip address is assigned to each device on a network, allowing devices on the same network to communicate with each other without using any public ip addresses.

7 0
1 year ago
Other questions:
  • A network administrator wants to logically separate web servers on the network. Which of the following network device will need
    10·2 answers
  • What’s the answer to this question?
    15·1 answer
  • Which type of computer graphic can be blown up to a much larger size without getting distorted or losing quality?
    5·1 answer
  • kieran wants to search a database quickly for information on the last time a patient came to his medical facility.The informatio
    14·2 answers
  • Given two variables matric_age and grad_age, write a statement that makes the associated value of grad_age 4 more than that of m
    15·1 answer
  • Write a code that takes numbers from the user as a list. (User can enter as many numbers as he wants). Then, find mean and stand
    15·1 answer
  • JUST MAXED OUT THE COMMENTS anyways come here
    7·2 answers
  • Help
    7·1 answer
  • Which of the following is NOT one of the three main ways to control a program when writing code?
    6·2 answers
  • Will economists be replaced by artificial intelligence?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!