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
Sonja [21]
2 years ago
10

Write a function called printRange() that accepts two integers as arguments and prints the sequence of numbers between the two a

rguments, surrounded by brackets ([]) and separated by a comma and a space. Print an increasing sequence if the first argument is smaller than the second; otherwise, print a decreasing sequence. If the two numbers are the same, that number should be printed by itself.
Computers and Technology
1 answer:
a_sh-v [17]2 years ago
5 0

Answer:

def printRange(start, stop, steps = 1):

   list1 = []

   if steps > start or stop:

       print("Steps is larger than start and stop value")

       return None

   if int(start) < int(stop):

       while start < stop:

           start = start + int(steps)

           list1.append(start)

       print(list1)

   elif start > stop:

       while start > stop:

           stop = stop + int(steps)

           list1.append(stop)

       print(list1)

   elif start == stop:

       print(start)

   else:

       print("Values are not integers.")

for easier viewing:

https://www.codepile.net/pile/e95verLk

If you need help understanding comment below.

You might be interested in
A character with the point size of 10 is about 10/72 of once inch in height
Dominik [7]

Answer:

True

Explanation:

Font Size is calibrated by a kind of calculation system which is known as points. And a single point happens to be 1/72 inches in height. And thus, a character with a point size of 1 is around 1/72 of one inch in height. And if the point size is 10, then the calculations confirm as above that the character will be around 10/72 of one inch in height.  

7 0
4 years ago
3. What are the first steps that you should take if you are unable to get onto the Internet? (1 point)
slavikrds [6]

Answer:

Check your router connections then restart your router.

Explanation:

When the internet connection is not displaying properly then the first step is to check the router. The network icon on the internet displays the availability of internet. Adjust the router and see if the router is working properly. If not restart the router so that it adjusts its settings to default. The connection will be available on the computer and internet will start working normally.

3 0
3 years ago
In a system using the fixed partitions memory allocation scheme, given the following situation (and using a decimal form): After
MariettaO [177]

Answer:

I think its B

Explanation:

7 0
3 years ago
Show a single view of an object, but show it in a way that makes it look 3-D, as your eye would see it.
Fofino [41]

A square from the front

5 0
4 years ago
How many bits do you need to count up to 30 help please
Soloha48 [4]

Answer:

5

Explanation:

2⁵ = 32, so that fits.

In general, to calculate the number of bits without guessing, you can take the 2 log of the number and then round up:

\log_2 30 \approx 4.9

rounded up gives 5.

3 0
3 years ago
Other questions:
  • AYUDAAA..... DARÉ TODOS LOS PUNTOS QUE PUEDA.
    15·1 answer
  • A layer of control in each communicating device that provides functions such as flow control, error detection, and error control
    13·1 answer
  • Graphic designers sometimes must adjust the spacing between letters so that the result looks right to them. This is called
    12·1 answer
  • Describe Network in terms of the classroom computer lab
    14·1 answer
  • he fundamental building block in every Hypertext Markup Language (HTML) document is the _____ tag, which marks a component in th
    7·1 answer
  • David uses Office Excel 2013 to calculate his average marks. He enters a formula in cell B5 to calculate the average based on th
    11·1 answer
  • In which job role would a course in 3D modeling help with professional career prospects?
    9·2 answers
  • Priscilla is providing the junior analysts in her firm with some real-world illustrations to explain some of the recommendations
    12·1 answer
  • Explain why an IT department and a user support group may disagree about the responsibility for the development of end-user appl
    8·1 answer
  • Check My Work Sherri is considering replacing a processor on her laptop. The laptop is running slower than she would like. What
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!