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

Other questions on the subject: Engineering

image
Engineering, 03.07.2019 15:10, breannaasmith1122
Two flowing streams of argon gas are adiabatically mixed to form a single flow/stream. one stream is 1.5 kg/s at 400 kpa and 200 c while the second stream is 2kg/s at 500 kpa and 100 ? . it is stated that the exit state of the mixed single flow of argon gas is 150 c and 300 kpa. assuming there is no work output or input during the mixing process, does this process violate either the first or the second law or both? explain and state all your assumptions.
Answers: 1
image
Engineering, 04.07.2019 18:10, salazjlove
Which of the following refers to refers to how well the control system responds to sudden changes in the system. a)-transient regulation b)- distributed regulation c)-constant regulation d)-steady-state regulation
Answers: 1
image
Engineering, 04.07.2019 18:10, oshawn108
Ahot wire operates at a temperature of 200°c while the air temperature is 20°c. the hot wire element is a tungsten wire of 5 um diameter and 2 mm in length. plot using excel current, heat transfer and heat generated by the wire for air velocity varying from 1-10 m/s in steps of lm/s? matlab the sensor voltage output, resistance, or assume nu 0.989 re033pr13 take air properties at tr (200°c20°c)/2 = 110°c properties of tungsten: c 0.13 kj/kg. k 3 p 19250 kg/m k (thermal conductivity) = 174 w/m. k
Answers: 2
image
Engineering, 04.07.2019 18:20, maustin5323
Athin walled concentric tube exchanger is used to cool engine oil from 160°c to 60°c with water that is available at 25°c acting as a coolant. the oil and water flow rates are each at 2 kg/s, and the diameter of the inner tube is 0.5 m and the corresponding value of the overall heat transfer coefficient is 250 w/m2. oc. how long must the heat exchanger be to accomplish the desired cooling? cpwater=4.187 kj/kg-candcpengine el=2.035 kj/kg·°c, oil . 120]
Answers: 1
You know the right answer?
Codio Challenge Activity Python

We are passing in a list of numbers. You need to create...

Questions in other subjects:

Konu
Mathematics, 12.02.2021 23:00
Konu
English, 12.02.2021 23:00