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
Which type of service offers a preconfigured testing environment for application developers to create new software applications?
Vaselesa [24]

A type of service which offers a preconfigured testing environment for application developers to create new software applications is: B - Platforms as a Service (PaaS).

<h3>What is cloud computing?</h3>

Cloud computing can be defined as a type of computing service that requires the use of shared computing resources over the Internet, rather than the use of local servers and hard drives.

<h3>The categories of cloud service.</h3>

Generally, cloud computing comprises three (3) service models which includes the following;

  • Infrastructure as a Service (IaaS).
  • Software as a Service (SaaS).
  • Platform as a Service (PaaS).

In conclusion, a type of service which offers application developers a preconfigured hosting and testing environment to create new software applications is Platforms as a Service (PaaS).

Read more on Platform as a Service here: brainly.com/question/24233315

#SPJ1

6 0
2 years ago
In 1–3 sentences, describe one reason you would import data into a database.
Norma-Jean [14]

Answer and Explanation

A database is an organised collection of a data which is stored and can be easily, managed, updated and can be accessed electronically when required. The reason for importing your data into the data base is because this data is secure from unauthorized people. This is because to access this data you need to login. You can also update it and access it electronically when the need be.

8 0
3 years ago
Read 2 more answers
Howard’s In The Process Of Creating A Google Display Campaign And Decides To Use Custom Intent Audiences As A Targeting Option.
Vladimir79 [104]

Answer:

Option 3 and Option 4 i.e., URLs and Keywords are correct.

Explanation:

Howard through the Phase for developing the following display project as well as determines to still use specific Purpose Viewers As just the targeting tool. He would prefer to affect consumer attention, however his limited demographic is not served by such an in-market client group.  

  • Thus, URLs, as well as keywords, are data inputs that Howard sends to better serve his viewer.
  • So, the following are the reason that describe the other options are not appropriate according to the scenario.
6 0
3 years ago
What command is used to generate an RSA key pair?
Leokris [45]

Answer:

D) crypto key generate rsa

Explanation:

In cryptography, the RSA refers to Rivest–Shamir–Adleman. This is an algorithm used for encrypting and decrypting messages in computers thereby ensuring secured transmission of data. In order to generate an RSA key pair, you will use the command crypto key generate rsa while in the global configuration mode. This command has the following syntax:

crypto key generate rsa [general-keys| usage-keys| signature| encryption] [<em>labelkey-label</em>] [exportable] [modulus <em>modulus-size</em>] [storage <em>name of device</em>:][redundancy][on <em>name of device</em>:],

with each parameter having its description

5 0
3 years ago
When using an IDE, what must you do to use a class that's stored in a library? Select one: a. Nothing. Classes in libraries are
AleksAgata [21]

Answer:

Both B and C

Explanation:

In order to use methods from another class (library) in your code, the class library will have to be added or imported into your code.

This is implemented in different ways across different programming languages, for example;

Java uses the keyword import followed by the class library name

C++ uses the key word #include

C# Uses the keyword using

8 0
3 years ago
Read 2 more answers
Other questions:
  • ________ viruses are often transmitted by a flash drive left in a usb port.
    8·1 answer
  • Please help me!! 10 Points are waiting!!
    8·1 answer
  • WILL GIVE BRAINLIEST TO HELPFUL ANSWERS!
    8·1 answer
  • How do a router and switch differ when handling a message? Both a router and a switch use the message’s destination address to s
    10·1 answer
  • Saved
    5·1 answer
  • The Uniform Commercial Code (UCC) attempts to provide: a. a framework for international contracts. b. a body of rules for dealin
    15·1 answer
  • Which of the following is not a Nintendo game character?
    6·2 answers
  • If the code for JAVA is LCXC, what is the code for BASIC?
    12·1 answer
  • We cannot imagine a life without the Internet. Imagine that you had to live without being connected to the Internet. Discuss the
    9·1 answer
  • Lol fortnite really going UwU and anime
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!