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
If you want to prioritize downloads of your mobile app instead of visits to your mobile site, you should: a) add a sitelink exte
scoray [572]

Answer:

create a Universal App campaign

3 0
2 years ago
A blank is the full web Address for particular website<br> (Computer technology)
Yuki888 [10]
What do you mean by that
6 0
3 years ago
Create a server program and a client program. The client program reads a line from a text file, converts everything to upper cas
Tema [17]

Answer:

Explanation:

Find the both server and client files attached below.

Download txt
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> txt </span>
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> txt </span>
4 0
3 years ago
Who is the host in super monkey ball?
Savatey [412]

Answer:

Brian

Explanation:

3 0
3 years ago
7.4.4: Length of User's Name
Natalija [7]

Answer:

user_name = input("input user name: ")
print(len(user_name))

Explanation:

input - input function in python

len - length of value

print - print data

6 0
2 years ago
Other questions:
  • Select one of the following strategies: active listening, sandwich technique, constructive feedback. in 2-5 paragraphs, define a
    11·1 answer
  • Write a program in C++ or C that includes two different enumeration types and has a significant number of operations using the e
    15·1 answer
  • In Microsoft Word, when you highlight existing text you want to replace, you're in
    7·1 answer
  • You suspect a component in a computer is fried. You remove any unnecessary hardware devices one by one to narrow down where the
    7·1 answer
  • Which of the following are incident priorities?
    9·1 answer
  • Which of the following are the functions of an os?
    8·1 answer
  • In the context of computer and network security, _____ means that a system must not allow the disclosing of information by anyon
    10·1 answer
  • What is command is used to improve the vocabulary and in which tab is it found​
    14·1 answer
  • What is smarta Art ? ​
    10·1 answer
  • Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source. N
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!