subject
Computers and Technology, 07.12.2019 04:31 jessv01

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: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When using a public computer or network, you should always
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
You are most likely to automatically encode information about
Answers: 1
question
Computers and Technology, 24.06.2019 07:20
3pointsyou've found an image you want to insert into your slide presentation. youwant to make the image look more gray so that it looks like an older imagewhat would you need to adjust? 0.00o a. sizeo b. hueo c. contrasto d. tones
Answers: 2
You know the right answer?
Codio challenge activity python

we are passing in a list of numbers. you need to create...
Questions
question
English, 24.02.2022 15:40
Questions on the website: 13722359