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
_is the joining of two or more electrical conductors by mechanically twisting the conductors together or by using a special spli
adell [148]

Splicing is the joining of two or more electrical conductors by mechanically twisting the conductors together or by using a special splicing device.

Which is an electrical conductor?

An electrical current flows through a conductor because it provides little to no resistance to the movement of electrons. Typically, good electrical conductors include metals, metal alloys, electrolytes, and even some nonmetals like graphite and liquids like water.

What is the purpose of a splice?

It can be used to package and stop the fraying of rope ends as well as as a foundation for more complex knots like the surgeon's knot and the square knot. Wrap the rope end around the standing part to form a loop, then bring the end of the loop through and draw the rope taut to tie an overhand knot.

Is it safe to splice electrical wire?

The splice may overheat and pose a fire risk when the current passes through it. Always utilize a junction box to store all the spliced wires while splicing wires. Any sparks produced during a short circuit are contained in junction boxes, which offer protection from electrocution and fires.

Learn more about electrical conductors: brainly.com/question/28209810

#SPJ4

4 0
1 year ago
How can I download music and films at home without breaking the law?
mina [271]

Answer: use a legal music downloader

Explanation: :)

5 0
3 years ago
Read 2 more answers
A 10 Superscript negative 910−9​-F capacitor ​(11 nanofaradnanofarad​) is charged to 5050 V and then disconnected. One can model
vredina [299]

Answer:

Explanation:

i) On a cold day, Capacity = (66 X 910 X 10∧-9) F

Charge, Q = (66 X 910 X 10∧-9) X 5050 = 0.30 Columb

Current, I= 5050/131013 = 0.039 Amp (where Resistance = 131013 ohms)

Time, t= 0.30/0.039 = 7.7 seconds

ii) On a humid day, Capacity = (77 X 910 X 10∧-9) F

Charge, Q = ( 77 X 910 X 10∧-9) X 5050 = 0.35 Columb

Current, I= 5050/6106 = 0.83 Amp ( where Resistance = 6106 ohms)

Time, t= 0.35/0.83 = 0.42 h or  0.42 X 60 mins = 25 mins

7 0
3 years ago
Why we need to interpret the drawing and plans
scoray [572]

Technical drawing is essential for communicating ideas in industry and engineering.

5 0
2 years ago
Who plays Roblox and wants to be friends on it
qaws [65]
I have roblox and I would like to be friends on it
4 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that asks the user for three strings. Then, print out whether the first string concatenated to the second string
    8·1 answer
  • What do I need to write ??
    14·1 answer
  • Big data refers to huge collections of data that are difficult to process, analyze, and manage using conventional data tools. It
    13·1 answer
  • Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all vehicles in its Guz
    15·1 answer
  • Examine the following algorithm.
    9·1 answer
  • Draw a datapath that can perform the following set of register replacement and combinational operations. Assume all registers ar
    5·1 answer
  • Hey, how is everyone????????????????????????????????
    8·2 answers
  • Which of the following is an input device on a toaster?
    10·2 answers
  • Mrs. Schlair has an annual salary of $96,402.<br> a. What would her semimonthly salary be?
    9·1 answer
  • How does xm satellite deter nonsubscribers from listening to its transmissions? Does this make the radio programing a private go
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!