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
Ifa component is made of two or more materials with different modulus of elasticity (e), it is called a composite member and we calculate the factor·n". mention the formula for calculating n". also, ifn> 1, explain what will happen to the 1. transformed.gi) ifn 1, what will happen to the material when transformed material when
Answers: 1
question
Engineering, 04.07.2019 18:20
A2-m rigid tank initially contains saturated water vapor at 100 kpa. the tank is connected to a supply line through a valve. steam is flowing in the supply line at 600 kpa and 300 c. the valve is opened, and steam is allowed to enter the tank until the pressure in the tank reaches the line pressure, at which point the valve is closed. a thermometer placed in the tank indicates that the temperature at the final state is 200°c. determine (a) the mass of steam that has entered the tank (b) the amount of heat transfer.
Answers: 3
question
Engineering, 04.07.2019 19:20
Consider airflow over a flat plate of length l = 1.5 m under conditions for which transition occurs at le = 0.9 m based on the critical reynolds number, re,e = 5 x 10. evaluating the thermophysical properties of air at 400 k, determine the air velocity. (hint: use the tables to find the properties of air)
Answers: 3
question
Engineering, 06.07.2019 02:30
A75mm diameter shaft is supported in a journal bearing 75mm long with a diametral clearance of 0. 1mm. it supports a radial load of 1000 n and is lubricated with sae 50 oil at 70°c. find the friction torque and the power loss when the crankshaft rotates at 2900 rev/min.
Answers: 1
You know the right answer?
Codio Challenge Activity Python

We are passing in a list of numbers. You need to create...
Questions
question
Mathematics, 27.11.2019 01:31
question
History, 27.11.2019 01:31
Questions on the website: 13722365