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
Grace [21]
3 years ago
13

Write a Python function that takes as input a list, A, and returns two lists L and G. L constains all numbers in A, which are no

t A[0] and are less than or equal to A[0]. G contains all numbers in A, which are not A[0], and are greater than A[0].
Computers and Technology
1 answer:
DiKsa [7]3 years ago
8 0

Answer:

In Python:

def split(A):

   L=[]; G=[]

   for i in range(1,len(A)):

       if (A[i] != A[0] and A[i] < A[0]):

           L.append(A[i])

       if (A[i] != A[0] and A[i] > A[0]):

           G.append(A[i])

   return L, G

Explanation:

This defines the function

def split(A):

This initializes the L and G lists

   L=[]; G=[]

This iterates through the original list A

   for i in range(1,len(A)):

This populates list L using the stated condition

<em>        if (A[i] != A[0] and A[i] < A[0]):</em>

<em>            L.append(A[i])</em>

This populates list G using the stated condition

<em>        if (A[i] != A[0] and A[i] > A[0]):</em>

<em>            G.append(A[i])</em>

This returns the two lists L and G

   return L, G

You might be interested in
Images, symbols, and diagrams are types of
Nataly [62]
D is the answer to the question

4 0
3 years ago
Read 2 more answers
The email_list function receives a dictionary, which contains domain names as keys, and a list of users as values. Fill in the b
zysi [14]

Answer:

Following are the solution to this question:

Please find the attachment of this code.

Explanation:

In this code, an email_list method is declared, that accepts a domains parameter, and in the next step, an empty list and two for loop are defined, in which the first for loop is used for a count parameter value and in the second loop is use the append method to add the given value, and use the return method to print its value, and use the print method to call the "email_list" method.  

3 0
3 years ago
In your presentation you add a textbox to _______.
frosja888 [35]
The answer to this question is letter "A. cite a source". Citing a source is an important content of the presentation so as not to take the credit away from the real source of the ideas presented. Not citing the sources could be a ground for plagiarism. 
3 0
3 years ago
One technique to find the "things" that need to be included in the new system begins by starting with a user and the use cases a
Shalnov [3]

Answer:

Coding is a skill where you take instructions (the steps in a task) and translate it into a languaage.

Explanation:

Coding is a skill where you take instructions (the steps in a task) and translate it into a language the computer understands since computers do not communicate like humans. They communicate in a language called BINARY and

6 0
4 years ago
2 Producto o servicio que haya experimentado una innovación técnica
Artemon [7]

Answer:

El producto o servicio también puede atraer a un mercado más grande y corriente si  La innovación disruptiva es una teoría que se refiere a un concepto, producto o

Explanation:

Esperemos que esto le ayude

4 0
4 years ago
Other questions:
  • Identifying Characters
    11·2 answers
  • Neighbor discovery performs many of the functions that icmp router discovery and icmp ____ handled in ipv4.
    13·1 answer
  • A ____ is a collection of computers and users that are identified by a common security database. workgroup controller segment do
    7·1 answer
  • ____ is a programming language used to view and manipulate data that is stored in a database.
    6·1 answer
  • In Microsoft word when you highlight existing text you want to replace , you're in?
    15·1 answer
  • Nothing bottomnothing
    9·1 answer
  • Ali is creating a document on a system using his login credentials. His colleague needs to use his system to access documents. H
    15·1 answer
  • Convert Fahrenheit to Celsius using this formula: F = (9/5)*C+32
    5·1 answer
  • List four types of Web browsers<br>​
    5·2 answers
  • an attack has changed the value of a variable used when copying files from one cloud server to a local drive. what is the most l
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!