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]
3 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]3 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
At your job, you often have to address letters to the customer support manager, Tyson Kajewski. The problem is that you are cons
krek1111 [17]
Input his name in the dictionary function, you can also copy the given name an paste as much as you need
5 0
4 years ago
A fitness tracker can be classified as a wearable computer. true
Kay [80]
Depends, but I'd say false.
5 0
3 years ago
What are the value and data type (float, int, bool, or str) of this expression:<br><br> 5 % 2
amm1812

Answer: float

Explanation:

This is asking what would the remainder be of 5/2. I am not totally sure what you are asking but float is used with remainders because it could have a decimal like 3.33 that would throw an error for anything other than float.

3 0
2 years ago
What things have small motors
aliya0001 [1]

Lots of things - your car has a engine that is used as a generator (your alternator). Cell phones that vibrate have a small electric motor with an uneven weight on the rotor which causes vibration ...

Hope this helps. :)

4 0
3 years ago
The following loop draws 3 circles on the screen. If I wanted to alter this loop to draw 10 circles, how many lines would my cod
tankabanditka [31]

Answer:

B). 3 lines

Explanation:

In order to modify the loop is drawn using three circles to make it drawn employing ten circles, <u>the code must be comprised of three lines</u>. The execution of line 1 includes 3 as the value of x while y remains undefined. Line 2 would employ the same value of x i.e. 3 and the introductory value of y(5 = 3 + 2) where x + 2 is being executed. In the third line, 10 circles can be drawn in total in the loop as {2(previous value) * 5 = 10}, y's updated value.

7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the absolute pathname of the YUM configuration file? REMEMBER: An absolute pathname begins with a forward slash
    12·1 answer
  • Laura is confused with the spelling of the word pronunciation. She types the word pronunciation. Which feature of the auto corre
    8·2 answers
  • How to connect a three way switch to a regilar switch?
    9·1 answer
  • Write a function called convert_format which converts the format of a date from mm/dd/yyyy to month name dd, yyyy.
    12·1 answer
  • What can be designed to create annoying glitches or destroy data
    11·1 answer
  • The word Only is absolute or qualified
    8·2 answers
  • Select the correct answer.
    13·2 answers
  • If you came across an article that discussed the benefits of studying the night before a test rather than the morning of, what c
    12·1 answer
  • Noi needs to send some documents to a client in another company. Which device can she use to make digital copies of the paper fi
    13·2 answers
  • Write 3 3 advantage and disadvantage of computer​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!