subject
Engineering, 11.02.2020 06:22 rockinrachel9099

Codio Challenge Activity Python

We are passing in a list of numbers. You need to create 2 new lists in your chart, then

put all odd numbers in one list

put all even numbers in the other list

output the odd list first, the even list second

Tip: 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,9

Expected Output: [1, 3, 5, 7, 9]
[2, 4, 6, 8]


Given Code:

# Get our input from the command line
import sys
numbers = 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

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 18:20
Inadequate stores control is not an obstacle to effective work order system. (clo4) a)-true b)-false
Answers: 3
question
Engineering, 04.07.2019 18:20
Avolume of 2.65 m3 of air in a rigid, insulated container fitted with a paddle wheel is initially at 264 k, 5.6 bar. the air receives 432 kj by work from the paddle wheel. assuming the ideal gas model with cv = 0.71 kj/kg • k, determine for the air the amount of entropy produced, in kj/k
Answers: 2
question
Engineering, 04.07.2019 19:20
Determine (a) the maximum thermal efficiency of reversible power cycles operating between a hot reservoir at 1000°c and a cold reservoir at 200°c and (b) the maximum cops for reversible refrigeration and heat pump cycies, respectively, between 28°c and 14°c.
Answers: 1
question
Engineering, 06.07.2019 03:20
Areaction-bonded silicon nitride ceramic has a strength of 250 mpa and a fracture toughness of 3.4 mpa(m)^1/2, what is the largest-sized internal flaw that this material can support without fracturing? (use y -1 in the fracture-toughness equation.)
Answers: 3
You know the right answer?
Codio Challenge Activity Python

We are passing in a list of numbers. You need to create...
Questions
question
Mathematics, 06.10.2019 19:30
Questions on the website: 13722360