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
SCORPION-xisa [38]
3 years ago
14

The loop function is similar to range(), but handles the parameters somewhat differently: it takes in 3 parameters: the starting

point, the stopping point, and the increment step. When the starting point is greater than the stopping point, it forces the steps to be negative. When, instead, the starting point is less than the stopping point, it forces the step to be positive. Also, if the step is 0, it changes to 1 or -1. The result is returned as a one-line, space-separated string of numbers.
Computers and Technology
1 answer:
nexus9112 [7]3 years ago
5 0

Answer and Explanation:

def loop(start, stop, step):

   return_string = ""

   if step == 0:

       step = 1

   if start > stop:  # the bug was here, fixed it

       step = abs(step) * -1

   else:

       step = abs(step)

   for count in range(start, stop, step):

       return_string += str(count) + " "

   return return_string.strip()

You might be interested in
How desktop case or chassis designed?, material and steps?​
MariettaO [177]

They may require things such as plastic cut outs and glass depending if you want to be able to have a window to look into the pc. Some cases are 3D Printed although they have to be joined by screws at the end due to the fact that one whole print can take over a week and then it has to be well doesn't but looks better when sanded.

3 0
2 years ago
________ employs state-of-the-art computer software and hardware to help people work better together.
qaws [65]

Answer:not enough information

Explanation:

6 0
3 years ago
Joanna accidentally leaned on her keyboard and repeatedly typed the letter z. How can she fix this mistake?
Brut [27]

Answer:

just press delete

Explanation:

5 0
3 years ago
Read 2 more answers
Which telecommunications offering is a component of social media? A.)web conferencing
vichka [17]
I would say C. podcast??? not for sure
7 0
3 years ago
Read 2 more answers
Which printing options are available in the Print menu? Check all that apply.
sasho [114]

1

3

4

6

mam nadzieje że pomogłem                                                  

6 0
3 years ago
Read 2 more answers
Other questions:
  • Data about the size and composition of a population are gathered in a survey called _____.
    6·2 answers
  • Who is known as the father of computer? ​
    6·2 answers
  • ______ are single numbers or values, which may include integers, floating-point decimals, or strings of characters.
    10·1 answer
  • Some people are unable to arrange six matches to form four equilateral triangles because they fail to consider a three - dimensi
    6·1 answer
  • The physical parts of the computer that you can see and touch are called______.
    5·1 answer
  • The ____ method writes a newline character after the data.
    11·1 answer
  • Linela Insurance needs to hire twenty accountants immediately to support its accounts receivable process. The hiring and trainin
    7·1 answer
  • Consider the scenario below. Will the solution attempted by the technician fix the problem or make it worse? Defend your answer.
    5·1 answer
  • To exclude members of a group from the basic permissions for a folder, which type of permission would you assign? Deny Allow Mod
    13·1 answer
  • Carbohydrates are a huge source of
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!