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
Musya8 [376]
2 years ago
10

Write a program whose input is two integers, and whose output is the first integer and subsequent increments of 5 as long as the

value is less than or equal to the second integer. Ex: If the input is: "-15" 10 the output is: "-15" "-10" "-5" 0 5 10 Ex: If the second integer is less than the first as in: 20 5 the output is: Second integer can't be less than the first.
Computers and Technology
1 answer:
Anna11 [10]2 years ago
6 0

Answer:

The program in Python is as follows:

num1 = int(input())

num2 = int(input())

if num2 < num1:

   print("Second integer can't be less than the first.")

else:

   for i in range(num1,num2+1,5):

       print(i,end=" ")

Explanation:

This gets the first integer from the user

num1 = int(input())

This gets the second integer from the user

num2 = int(input())

If the second is less than the first, the following prompt is printed

<em>if num2 < num1:</em>

<em>    print("Second integer can't be less than the first.")</em>

If otherwise, the number between the intervals is printed with an increment of 5

<em>else:</em>

<em>    for i in range(num1,num2+1,5):</em>

<em>        print(i,end=" ")</em>

<em />

You might be interested in
The most serious security threat to Bluetooth-enabled devices is ____, which occurs when a hacker gains access to the device and
Semmy [17]

The most serious security threat to Bluetooth-enabled devices is \sf\purple{bluebugging}, which occurs when a hacker gains access to the device and its functions without the owner's consent.

\large\mathfrak{{\pmb{\underline{\orange{Happy\:learning }}{\orange{.}}}}}

6 0
3 years ago
Role of User Defined Iprms for creation of paten
Mazyrski [523]

Answer:

3

Explanation:

3 0
2 years ago
When converting text to a table, which feature should be used?
velikii [3]
I’m pretty sure it would be an insert tab
4 0
2 years ago
What is meant by versatility in terms of features of computer?​
scoray [572]

Answer:

Versatility refers to the capability of a computer to perform different kinds of works with same accuracy and efficiency.

Explanation:

thank me later

3 0
3 years ago
Read 2 more answers
_ effects determine how slide elements disappear
kupik [55]
<span>Exit effects determine how slide elements disappear. </span>
6 0
3 years ago
Other questions:
  • Which windows tools would you use to browse the files system on a hard drive?
    6·2 answers
  • Briefly describe the client/server model.
    8·1 answer
  • Which f the following is not a characteristic of igneous rock
    8·1 answer
  • _____________ describes the abstraction of web-based computers, resources, and services that system developers can utilize to im
    9·1 answer
  • Do debit cards offer the highest level of fraud pretection?
    10·1 answer
  • What is the output?<br> &gt;&gt;&gt; phrase = "hello mom"<br> &gt;&gt;&gt; phrase upper()
    6·2 answers
  • You are sending Secret information to a colleague located at another office. You want to give him some background information an
    15·1 answer
  • PLZZZZ help will give brainlest
    5·1 answer
  • Something I should look for when trying to decide if a source is credible is the publication's ....
    10·1 answer
  • Please help me on this it’s due now
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!