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
nikitadnepr [17]
3 years ago
13

Codio Challenge Activity PythonWe are passing in a list of numbers. You need to create 2 new lists in your chart, then put all o

dd numbers in one list put all even numbers in the other list output the odd list first, the even list secondTip: you should use the modulo operator to decide whether the number is odd or even. We provided a function for you to call that does this.Don’t forget to define the 2 new lists before you start adding elements to them.------------------------------------------------------------Requirements:Program Failed for Input: 1,2,3,4,5,6,7,8,9Expected Output: [1, 3, 5, 7, 9][2, 4, 6, 8]------------------------------------------------------------Given Code:# Get our input from the command lineimport sysnumbers = sys.argv[1].split(',')for i in range(0,len(numbers)):numbers[i]= int(numbers[i])def isEven(n) :return ((n % 2) == 0)# Your code goes here
Computers and Technology
1 answer:
lilavasa [31]3 years ago
7 0

Answer:

The python code is given below with lists defined.

Explanation:

import sys

def isEven(n) :

 return ((n % 2) == 0)  //for even items

numbers = sys.argv[1].split(',')

for i in range(0,len(numbers)):

 numbers[i]= int(numbers[i])

even = []

odd = []

for i in numbers:

   if isEven(i):

       even.append(i)  #adds i to even list if it is even

   else:

       odd.append(i)  #adds i to odd list if not even (odd)

print(odd)

print(even)

You might be interested in
How to make a 'Sign in with replit' button in replit (Node.js) will make brainliest
Y_Kistochka [10]

hit the sign in botten or create new account

3 0
3 years ago
Read 2 more answers
Which type of ICS facility is used to temporarily position and account for personnel, supplies, and equipment awaiting assignmen
Black_prince [1.1K]

Answer:

C. Staging Area

Explanation:

According to my research on different ICS facilities, I can say that based on the information provided within the question the facility being described here is called a Staging Area. Like mentioned in the question a staging area is a location set up at an incident where resources and personnel can be placed while waiting on instructions to proceed with an operation or assignment.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

6 0
3 years ago
List and discuss five economic growth indicators
patriot [66]
Strong employment numbers. To see economic growth there needs to be an increase in Gross Domestic Product (GDP). ...
Stable Inflation. ...
Interest rates are rising. ...
Wage Growth. ...
High Retail Sales. ...
Higher New Home Sales. ...
Higher Industrial Production.
5 0
2 years ago
The elements of an integer-valued array can be set to 0 (i.e., the array can be cleared) recursively as follows: An array of siz
marta [7]

Answer:.......

void clear(int *array, int length){

 

  if (length == 0)return;  

 

  array[0] = 0;  

 

  clear(array + 1, length-1);

}

Explanation:

The void function accepts an integer array.

7 0
3 years ago
You open a folder by double-clicking on it with your mouse. True False
allsm [11]
Depends if it's not working the first time then u click it twice but normally you click it once
5 0
3 years ago
Read 2 more answers
Other questions:
  • Anderson uses his computer and internet link to chart the movement of his favorite 46 stocks. He buys and sells according to the
    15·1 answer
  • Two different ways to bring up My Computer folder
    11·1 answer
  • Write a program that uses these bounds and bisection search (for more info check out the Wikipedia page on bisection search) to
    8·1 answer
  • A single-user database system automatically ensures ____ of the database, because only one transaction is executed at a time.
    13·1 answer
  • An aerophone is an instrument that causes ________ to vibrate, thus creating sound waves.
    11·2 answers
  • Suppose Host A sends Host B a TCP segment encapsulated in an IP datagram. When Host B receives the datagram, how does the networ
    11·1 answer
  • Which object event is an indication that something has been created but not committed into the database?
    13·1 answer
  • When in global configuration mode, which steps are necessary to edit an ip address on an Ethernet interface?
    11·1 answer
  • HELP!!!!!!!
    8·1 answer
  • Công dụng của đồng hồ đo điện:vôn kế, ampe kế, oát kế
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!