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
Which of the following methods is a static method? The class in which the method is defined is given in parentheses following th
maw [93]

Answer:

C. sqrt(Math)

Explanation:

All but one of options A to E are is not a static method.

Only option C is a static method. The sqrt() is a static method of Math, that can always be used as Math.sqrt() is used;

The Math class defines all of its methods to be static. Invoking Math methods is done by using Math as a method rather than a variable of type Math; this means that sqrt(Math) doesn't rely on instance variables and don't need to be overridden, unlike others.

Lastly, sqrt(Math) is a static method because unlike other options, it is an utility method, and it is relevant to computations on primitive data types.

The purpose of the static method is in large part to offer a standard library of functions, and it doesn't need to be applied directly to an object.

4 0
3 years ago
Which of the following are vector graphic file formats? Choose all that apply.
ddd [48]

i need pics to see what it is



5 0
3 years ago
Configuring a firewall to ignore all incoming packets that request access to a specific port is known as ____.
Sati [7]

Answer: Logical Point Blocking

Explanation:

4 0
1 year ago
Why MUST you request your DSO signed I-20 ship as soon as it is ready and who is responsible to request the I-20
Klio2033 [76]

Why MUST you request your DSO signed I-20 ship as soon as it is ready and who is responsible to request the I-20?

a. It is required you have an endorsed/signed I-20 when Customs and Border Patrol or police ask for it

b. We only keep an unsigned digital copy and cannot sign an I-20 after the fact

c. It is against U.S. regulations to send digital (signed or not) DS-2019s and must treat I-20s the same

d. You will need all signed original I-20s to make copies to apply for OPT, STEM and H-1B in the future, so get them now!

e. It is the student’s choice to request each term, however, we cannot go back retroactively to provide past copies

f. We can only provide a signed copy of current I-20 and if changes occur from previous semesters that information will not show

g. The original endorsed I-20 signed by a DSO will be destroyed after 30 days of issuance if not picked up, and it cannot be replicated

h. The cost to have I-20 shipped may go up at any time

i. All the above

Answer:

i. All the above

Explanation:

DSO means designated school officials and they have to do with Student and Exchange Visitor Program (SEVP)-certified schools where students have to get a Form I-20, “Certificate of Eligibility for Nonimmigrant Student Status which provides information about the student's F or M status.

What a student must request for from his DSO signed I-20 ship are all the above options.

8 0
3 years ago
How do i transfer contacts from one phone to another?
Papessa [141]
You will need both phones for this process  ,
 things you'll need
-2 phones the old phone and the new phone
- a brain
-fingers

how to process
- first get the old phone and send the messages  with all the contact numbers u need or want on the new phone and you will need to tell all of the people who u have contacts with that u got a new phone
have them put you in their contacts   
that's how u transfer contacts from one phone to another phone
8 0
3 years ago
Other questions:
  • ____ are not associated with data from the database and are used to display such things as the report's title
    15·1 answer
  • When used as parameters, _________ variables allow a function to access the parameter’s
    10·1 answer
  • What advantage does a reliable web page have over published textbooks and encyclopedias?
    15·2 answers
  • What is the greatest distance that can separate the USB 2.0 device from the computer?
    8·1 answer
  • _____ is the unauthorized entry into a computer system via any means
    9·1 answer
  • The statement print(words[len(words)]) will raise an exception. What should be placed in the blank so that this exception will b
    11·1 answer
  • hen a computer user stored data in computer memory, it required 1,024 bytes. How many KB does this represent?
    8·1 answer
  • Which tool determines whether or not applications, devices, and computers will work with a new operating system, while maintaini
    13·1 answer
  • Hello hello . please help me​
    8·2 answers
  • An understanding of basic psychology can help design and marketing teams ensure they meet their intended audience.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!