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
An application programming interface (API) is: Group of answer choices the code the application software needs in order to inter
WITCHER [35]

Answer:

The code the application software needs in order to interact with the CPU

Explanation:

7 0
3 years ago
In order for a computer to pass the ________, a human should have a conversation with it and not be able to tell if it was a mac
Katena32 [7]

The test that a computer needs to pass after a human's conversation with it and not be able to tell if it was a machine or a human is; Turing Test

<h3>Test of Computers</h3>

The correct answer to the blank portion of the question is Turing test. This is because Turing Test is a test of a computer's ability to exhibit intelligent behavior that is equivalent to, or indistinguishable from, that of a human's behavior.

Finally, If the evaluator cannot reliably tell the computer from the human, the machine is said to have passed the test.

Read more about Test of Computer at; brainly.com/question/21283135

8 0
2 years ago
Match the partition type to its description.
zlopas [31]

Answer:

A partition with an extended partition is a logical partition.

The partition with the boot loader is the system partition.

The section of the hard drive where you will install the operating system is the primary partition.

Read more on Brainly.com - brainly.com/question/14356373#readmore

Explanation:

7 0
3 years ago
_______is a term which describes how the operating system will interrupt the execution of an application when an application of
a_sh-v [17]

Answer:

scheduling

Explanation:

Scheduling- it is referred to as assigning a task to complete the goal or work on time. he works can include data flow, processing of data, etc.

There are two main types of scheduling

1) Preemptive process

2) Non- preemptive process

Preemptive process -  in this process, priority is given to important tasks rather than less important tasks. the current task can be held for an important task

Non-preemptive process -  It is referred to that process when the predefined schedule follows. In this  process, next task executed only when current task finish

6 0
2 years ago
(Java) Can anyone help me with this ?? The skeleton of the code must be same as the image.
Kay [80]
Is that a essay ur supposed to write

6 0
2 years ago
Other questions:
  • Im trying to learn c# for unity does anyone know any good sources
    10·1 answer
  • Can you answer my question it's a bit confusing to me! I'm adding brainlist too!
    8·1 answer
  • Evaluating how current, credible, and unbiased a source is ensures:
    7·1 answer
  • Explain why professional software that is developed for a customer is not simply the programs that have been developed and deliv
    13·1 answer
  • After conducting interviews with several bad candidates, Althea, a manager at Langrover Inc. interviewed a candidate who was bet
    15·1 answer
  • Data stored on physical storage devices must do what before the processor can access it? Be converted to binary Be written to th
    9·1 answer
  • True/False: On the piano, middle C is located to the left of the 2 black keys in the middle.
    9·2 answers
  • Why is operating system important software for computer?give 3 reasons
    8·1 answer
  • Aspire is a test you take to prepare for the<br> A. PSAT<br> B. SAT<br> C. ACT<br> D. FAFSA
    11·1 answer
  • Add me on f0rtnite <br> (Tsarbacon)
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!