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]
1 year 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]1 year 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
Q2
rosijanka [135]

Answer:

Computer is a electronic device which give us accurate result in a short preodical of time

6 0
2 years ago
Read 2 more answers
One common command-line network utility tool is “netstat,” which displays which protocol is being used. It can review particular
labwork [276]

An example of two potential uses of this command is in the area or aspect of:

  • The troubleshoot of networking problems.
  • In configuration

<h3>What protocol does the netstat command use?</h3>

It is known to use the Internet Protocol (TCP/IP) and it is one that is used without parameters, this command  is said to often show active TCP connections.

<h3>What is netstat used for?</h3>

The network statistics ( netstat ) command is known to be a kind of a networking tool that is often used for troubleshooting and configuration, and this is one that can be used as a tool for monitoring for connections over the network.

Hence,  it is used in incoming and outgoing connections, routing tables, port listening, and others. Therefore, An example of two potential uses of this command is in the area or aspect of:

  • The troubleshoot of networking problems.
  • In configuration

Learn more about troubleshoot from

brainly.com/question/9572941

#SPJ1

3 0
1 year ago
Which of the following statements about renting and owning
laila [671]
Renting means you sign a contract or a lease to live their owning means you bought the house and pay mortgage <span />
5 0
3 years ago
Write a partial class that shows a class constant and an instance method. Write an instance method that converts feet to inches
MA_775_DIABLO [31]

Answer:

Please the code snippet below, the code was writen in Kotlin Language

Explanation:

const val inches:Int= 12 .   //This is the const value

fun main(args: Array<String>) {

 //this will ask the user for input

   print("Enter a number")            

  //this will do the conversion

var valueInFeet= Integer.valueOf(readLine())*inches

   print("The value in feet is $valueInFeet feet(s)")  

   }

4 0
2 years ago
Address Resolution Protocol (ARP) is a protocol for mapping an IP address to a physical machine address that is recognized in th
Nimfa-mama [501]

Answer: Switch

Explanation: ARP spoofing is a illegal harmful activity in a disguised manner by a person who tries to send the ARP (Address resolution protocol)request.The disguised ARP request is sent to steal the confidential data by the overloading of the switch because of the numerous amount of the ARP request. This attack is done in the local area network .Therefore, the correct option is switch.

6 0
2 years ago
Other questions:
  • Look at the circuit shown in the figure above. Switch S1 is open as shown, and R1 and R2 each have a value of 100 k. If you conn
    11·1 answer
  • Bullets in a text box will do which of the following?
    9·2 answers
  • Contextual targeting method mean
    11·1 answer
  • In class, we discussed static local variables in C. Answereach question below; if necessary, find and consult a reference on the
    10·1 answer
  • What xDSL version provides a maximum throughput of 24 Mbps downstream and 3.3 Mbps upstream?
    9·1 answer
  • Which do web servers host?<br> Websites<br> Networks<br> Firewalls<br> Zones
    8·1 answer
  • What is a well-planned strategy that ensures the search and navigation functions are easy to use and user-friendly on a website?
    15·1 answer
  • What is Brainly?<br><br> A.Yes<br> B.No
    12·2 answers
  • Hi wanna play fortnite tomorrow add me im batjoker09 no caps or spaces
    13·1 answer
  • 7. Which cipher is based on the clues of the physical factors, rather than the hardware or a software cryptosystem
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!