1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nikitadnepr [17]
3 years ago
13

Codio Challenge Activity PythonWe are passing in a list of numbers. You need to create 2 new lists in your chart, then put all o

dd numbers in one list put all even numbers in the other list output the odd list first, the even list secondTip: 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,9Expected Output: [1, 3, 5, 7, 9][2, 4, 6, 8]------------------------------------------------------------Given Code:# Get our input from the command lineimport sysnumbers = 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
Computers and Technology
1 answer:
lilavasa [31]3 years ago
7 0

Answer:

The python code is given below with lists defined.

Explanation:

import sys

def isEven(n) :

 return ((n % 2) == 0)  //for even items

numbers = sys.argv[1].split(',')

for i in range(0,len(numbers)):

 numbers[i]= int(numbers[i])

even = []

odd = []

for i in numbers:

   if isEven(i):

       even.append(i)  #adds i to even list if it is even

   else:

       odd.append(i)  #adds i to odd list if not even (odd)

print(odd)

print(even)

You might be interested in
Using pointers and shared memory for IPC, what would you need to add to your code to ensure data integrity?
Bess [88]

Answer:

integrgrg

Explanation:

integrety or not iim not

5 0
3 years ago
What is the range of possible sizes for side<br> x?<br> 4.0<br> 2.7
Aleksandr-060686 [28]

Answer:

1.3< x < 6.7 is the correct answer to the given question .

Explanation:

In this question the figure is missing We have attached the figure kindly find it .

Now coming to the answer

With the help of Triangle Inequality Theorem.

The triangle Inequality theorem saying that the total of a sizes of either side of a triangle is larger than the size of a third side

Consider that x be the measurement of the 3rd side triangle

Now apply the theorem of  Inequality

(1 )

4.0+2.7 > x\\\\6.7 > x

Update the equation so it will written like that

x< 6.7 \ units

(2)

Again with the help of triangle Inequality theorem

x+2.7 > 4.0\ \\x\ > 4.0-2.7\ \\x\ > 1.3\  units

Hence the possible ranges of the size is (1.3 ,6.7)

Therefore the answer is  1.3< x < 6.7

5 0
3 years ago
You can tell that the equals() method takes a ____ argument because parentheses are used in the method call.
melamori03 [73]

Answer:

c. String

Explanation:

The equals method in java String class takes an object reference as a parameter. We can compare two Strings with the help of equals method of the String class. The equals() method of the java String class compares the given strings based on the content of the string.

Use of the String equals method:-

if (stringOne> stringTwo) it will return a positive value.

if both of the strings are equal lexicographically  means

(stringOne == stringTwo) it will return 0.

if (stringOne < stringTwo) it will return a negative value.

4 0
4 years ago
Should a UDP packet header contain both Sour Port # and Destination Port #?
densk [106]

Yes, a UDP packet header should contain both Sour Port # and Destination Port #.

<h3>Which fields are included in a UDP header?</h3>

The fields that one can see in a UDP header are:

<h3> Source port :</h3>

This is known to be the port of the device that is known to be sending the data. This field is one that a person can set to zero only if the destination computer do not require one to reply to the sender.

<h3> Destination port :</h3>

This is known to be the port of the device that is said to be getting or  receiving the data.

Hence, to the answer above, my response is Yes, a UDP packet header should contain both Sour Port # and Destination Port #.

Learn more about UDP packet from

brainly.com/question/10748175

#SPJ1

4 0
2 years ago
Which four of the following hardware components are specifically used to enable networking and are not part of a stand-alone com
kenny6666 [7]
Router, switches, NIC, protocols
5 0
3 years ago
Read 2 more answers
Other questions:
  • Please help with this
    5·2 answers
  • In an inheritance situation, the new class that you create from an existing class is known as the:
    5·1 answer
  • "When you can control devices and appliances by apps installed on your smartphone or tablet, you are said to have"
    6·1 answer
  • Your computer has a single hard disk w/ a single volume used by the C:\ drive. You have previously upgraded the disk to a dynami
    6·1 answer
  • Public-key cryptography can be used for encryption (ElGamal for instance) and key exchange. Furthermore, it has some properties
    9·2 answers
  • Is anyone else having issues with brainly not working? Everytime I click on a answer it only comes up with the 7 month trail thi
    12·1 answer
  • If anyone gotta ps4, i'm a 15 yr old female n if u wanna b frens, hmu :))
    8·2 answers
  • Keira is creating an app for her cross-country team. Users will input their race times and the output will be a graph showing th
    6·1 answer
  • Animals living in burrows under the ground is an interaction between the biosphere and the
    11·1 answer
  • A manager suspects that one of his team members has been fraudulently accessing confidential and sensitive information and breac
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!