answer.
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
kari74 [83]
2 years ago
8

The even_numbers function returns a space-separated string of all positive numbers that are divisible by 2, up to and including

the maximum that's passed into the function. For example, even_numbers(6) returns “2 4 6”. Fill in the blank to make this work.
def even_numbers(maximum):
return_string = "" for x in ___: return_string += str(x) + " " return
return_string.strip() print(even_numbers(6)) # Should be 2 4 6 print(even_numbers(10)) # Should be 2 4 6 8 10 print(even_numbers(1)) # No numbers displayed print(even_numbers(3)) # Should be 2 print(even_numbers(0)) # No numbers displayed
Computers and Technology
1 answer:
Marina86 [1]2 years ago
5 0

Answer:

The correct form of the program in python is as follows

def even_numbers(maximum):

     return_string = ""  

     for x in range(1,maximum+1):

           if x % 2 == 0:

                 return_string+=str(x)+" "

     return return_string.strip()

Explanation:

This line defines the method

def even_numbers(maximum):

This line initializes return_string to an empty string

     return_string = ""  

This line iterates through variable maximum

     for x in range(1,maximum+1):

This line checks if the current number is even

           if x % 2 == 0:

If yes, the string is updated

                 return_string+=str(x)+" "

This line returns the full string of even numbers

    return return_string.strip()

When the method is tested with any of the following, it gives the desired result

<em>print(even_numbers(6)), print(even_numbers(10)), print(even_numbers(1)), print(even_numbers(3)) and print(even_numbers(0))</em>

You might be interested in
Write a algorithm to attend birthday party​
kolezko [41]

Answer:

2     No

5 14    Yes

Explanation:

8 0
2 years ago
Read 2 more answers
A security analyst is interested in setting up an IDS to monitor the company network. The analyst has been told there can be no
elena55 [62]

Answer:

d. Port mirror

Explanation:

Port mirroring is a method to monitor network traffic and it is used in the Intrusion Detection Systems. It is also called Switched Port Analyzer and is used to analyse the network errors. This technique basically copies the network packets and sends or transmits these copied packed from one port to another in a network device such as a switch. This means that this technique is used to copy the network packets from one switch port and send the copy of these packets to another port where these packets are monitored. This is how it analyses the network errors and incoming traffic for irregular behavior and also this can be done without affecting the normal operation of the switch and other network processes. It is simple, inexpensive and easy to establish and use. The most important advantage of using mirrored ports is that it catches the traffic on several ports at once or can capture all of the network traffic.

4 0
2 years ago
When Russ opened a website on his browser, he saw an error that the site was not compatible with the browser version he was runn
Umnica [9.8K]

Answer:

Patch finders.

Explanation:

Once Russ accessed a webpage on his computer, he had seen an issue that the page was not associated with the browser variant on which he was executing it, although it was important to use patch finders tool to fix the following problems because patch finder is only the software that can resolve the following issues.

3 0
2 years ago
A feedback mechanism that can be used to measure the effectiveness of a CSIRT is the ____. a. after action review b. IR plan tes
Andrei [34K]

Answer: C)definition of empirical measures

Explanation: CSIRT(Computer Security Incident Response Team) is the team that is related with the taking the measurement according to the related incident of the security. The tasks that are performed by the team are detection of security error, dealing with it ,introducing ideas to resolve it etc.

Empirical measure is the measure that technique which has randomness. Random measures are the based on the possible methods that can be used for solving the security issue.Thus feedback of CSIRT is effective or not can be seen by the empirical technique.Thus, the correct option is option(c).

8 0
2 years ago
Which company has experienced censorship in China?
MariettaO [177]
Google experienced censorship in china. :) 
5 0
2 years ago
Read 2 more answers
Other questions:
  • The navigation bar on the left side of ____ view contains commands to perform actions common to most office programs.
    15·1 answer
  • Ismael would like to insert a question mark symbol in his document. What steps will he need to follow to do that?
    5·2 answers
  • Zoey has brought her computer in for servicing. When she dropped off her computer, she mentioned that her computer will sometime
    15·2 answers
  • Our company is only interested in purchasing a software upgrade if it leads to faster connectivity and data sharing. The old sof
    7·1 answer
  • Suppose a retailer who has no technology expertise wishes to set up an online presence for his business. He ________. a. ​can us
    6·1 answer
  • You learned that properly edited resumes are necessary for making a good impression on a university or a potential employer. Dis
    13·1 answer
  • Given numRows and numColumns, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
    14·1 answer
  • Consider a short, 10-meter link, over which a sender can transmit at a rate of 150 bits/sec in both directions. Suppose that pac
    12·1 answer
  • What should businesses do in order to remain competitive under the current Cloud<br> landscape?
    6·2 answers
  • Choose the response that best completes the following statement.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!