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:10
An air conditioning system consist of a 5 cm diameter pipe, operating at a pressure of 200 kpa. the air initially enters the pipe at 15°c with a velocity of 20 m/s and relative humidity of 80%. if the heat supply throughout the process is 960 w, determine the relative humidity and the temperature at the outlet
Answers: 3
question
Engineering, 04.07.2019 18:20
Asolid cylinder is concentric with a straight pipe. the cylinder is 0.5 m long and has an outside diameter of 8 cm. the pipe has an inside diameter of 8.5 cm. the annulus between the cylinder ad the pipe contains stationary oil. the oil has a specific gravity of 0.92 and a kinematic viscosity of 5.57 x 10-4 m2/s. most nearly, what is the force needed to move the cylinder along the pipe at a constant velocity of 1 m/s?
Answers: 3
question
Engineering, 04.07.2019 19:10
How to increase the thermal officiency of an ideal simple rankino cycle? among these methods, which one is the best and why?
Answers: 2
question
Engineering, 04.07.2019 19:20
Amass-spring-viscous damper system of mass 3 kg has a frequency of 100 rad/s and is critically damped. its initial conditions are x(0)-3 mm and (0)-2.3 m/s. does the system overshoot its equilibrium position? prove your answer
Answers: 1
You know the right answer?
Codio Challenge Activity Python

We are passing in a list of numbers. You need to create...
Questions
Questions on the website: 13722365