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
DIA [1.3K]
2 years ago
3

write the remove evens() function, which receives a list of integers as a parameter and returns a new list of integers containin

g only the odd numbers from the original list. the main program outputs values of the returned list.
Computers and Technology
1 answer:
expeople1 [14]2 years ago
5 0

Program to identify odd numbers in a list, sending and returning parameters to and from a function. Screen output image attached.

<h3>Python Code</h3>

def removeEvens(lst):

  •   # Identify impar numbers

   lta = [int() for ind0 in range(10)]

   c = int()

   p = int()

   c = 0

   for d in range(10):

       p = 0

       if lst[d]%2!=0:

           p = p+1

  • # Insert the new list with impar integers

       if p==1:

        lta[c] = lst[d]

        c = c+1

   return lta

if __name__ == '__main__':

  • # define variables

list = int()

lst2 = int()

list = [int() for ind0 in range(10)]

lst2 = [int() for ind0 in range(10)]

  • # insert integers into the list

print("Enter 10 numbers: ")

for d in range(1,11):

 list[d-1] = int(input())

  • # call function

lst2 = removeEvens(list)

print("New list: ")

for d in range(len(lst2)):

    if lst2[d-1]!=0:

        print(lst2[d-1]," ", end="")

To learn more about identify odd numbers in python see: brainly.com/question/19180335

#SPJ4

You might be interested in
Only answer this question properly​
leonid [27]

Answer:

hi.......,.........

Explanation:

I wish it help you

Make me brainly

5 0
3 years ago
When a device or service causes the system to hang during a normal boot, boot into __________ and disable the device or service
Olenka [21]

You should boot into <u>safe mode</u> and disable the device or service when it causes the computer system to hang during a normal boot.

<h3>What is safe mood?</h3>

Safe mood can be defined as a boot option in which the operating system (OS) of a computer system starts in <u>diagnostic mode</u> rather than in a normal operating mode, so as to enable the user correct any problems preventing the computer system to have a normal boot.

This ultimately implies that, safe mood is a diagnostic mode of the operating system (OS) of a computer system that is designed and developed to fix most problems within an operating system (OS) and for the removal of rogue software applications.

Read more on safe mood here: brainly.com/question/13026618

5 0
2 years ago
The _____ is the area in Microsoft Excel where you can perform file commands such as Save, Open, and Print
Arlecino [84]
The BACKSTAGE VIEW is the area in Microsoft where one can perform file commands such as save, open and print.
The backstage view can be found under the file tab in the excel window. It has many options available and they include the following:info, new, open, save, save as, print, share, export and close. These options give the user the opportunity to perform desired functions on their workbook.
8 0
4 years ago
Fern has set up a computer network for the entire building. Unfortunately, the signal strength diminishes as it reaches toward t
stepladder [879]

Answer:

Repeaters

Explanation:

As the question points out, the signal strength diminishes (attenuates) as it travels farther from the source.  Deploying a repeater at critical points throughout the building would boost the signal strength as it continues on its way.

5 0
2 years ago
Write a program to ask for a Cartesian coordinate x,y. Your program should read in an x value and a y value and then inform the
AnnZ [28]

Answer:

The program in Python is as follows:

x = int(input("x: "))

y = int(input("y: "))

if x == 0:

   if y == 0:        print("Origin")

   else:        print("y axis")

elif x>0:

   if y > 0:        print("First Quadrant")

   elif y < 0:        print("Fourth Quadrant")

   else:        print("x axis")

elif x < 0:

   if y > 0:        print("Second Quadrant")

   elif y < 0:        print("Third Quadrant")

   else:        print("x axis")

Explanation:

These get input for x and y

<em>x = int(input("x: "))</em>

<em>y = int(input("y: "))</em>

If x is 0

if x == 0:

<em>............ and y is 0, then the point is at origin</em>

   if y == 0:        print("Origin")

<em>............ and y is not 0, then the point is on y-axis</em>

   else:        print("y axis")

If x is greater than 0

elif x>0:

<em>............ and y is greater than 0, then the point is at in the first quadrant</em>

   if y > 0:        print("First Quadrant")

<em>............ and y is less than 0, then the point is at in the fourth quadrant</em>

   elif y < 0:        print("Fourth Quadrant")

<em>............ Otherwise, the point is on the x axis</em>

   else:        print("x axis")

If x is less than 0

elif x < 0:

<em>............ and y is greater than 0, then the point is at in the second quadrant</em>

   if y > 0:        print("Second Quadrant")

<em>............ and y is less than 0, then the point is at in the third quadrant</em>

   elif y < 0:        print("Third Quadrant")

<em>............ Otherwise, the point is on the x axis</em>

   else:        print("x axis")

6 0
3 years ago
Other questions:
  • To change the print orientation from portrait to landscape, tap or click the ____ button on the print preview tab.
    15·1 answer
  • Assume that someone dictates you a sequence of numbers and you need to write it down. For brevity, he dictates it as follows: fi
    14·1 answer
  • . In an if/else statement, the if part executes its statement or block if the expression
    15·1 answer
  • What are some pros for having your phone during school hours?
    10·2 answers
  • What is one example of how teens use the internet and social media for cyberbullying
    12·2 answers
  • Find the complete predicate in the sentence below.
    6·1 answer
  • What are creative commons?
    14·2 answers
  • If you forget your privacy password what will you do if the ask this question what is the name of one of your teacher?​
    12·1 answer
  • A new school is being built in the local school district.It will have three computer labs with 28 computers each. There will be
    13·1 answer
  • Input images into a computer
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!