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
Fittoniya [83]
3 years ago
14

Write an application that prompts a user for two integers and displays every integer between them. Display There are no integers

between X and Y if there are no integers between the entered values. Make sure the program works regardless of which entered value is larger.
Computers and Technology
1 answer:
olga2289 [7]3 years ago
4 0

Answer:

x = int(input("Enter an integer: "))

y = int(input("Enter another integer: "))

if x > y:

   for number in range(y+1, x):

       print(number, end=" ")

elif y > x:

   for number in range(x+1, y):

       print(number, end=" ")

else:

   print("There are no integers between {} and {}".format(x, y))

Explanation:

*The code is in Python.

Ask the user to enter the two integers, x and y

Since we want our program to run regardless of which entered value is larger, we need to compare the numbers to be able to create the loop that prints the numbers.

Check if x is greater than y. If it is, create a for loop that iterates from y+1 to x-1 and print the numbers

Otherwise, check if y is greater than x. If it is, create a for loop that iterates from x+1 to y-1 and print the numbers

If none of the previous part is executed, print that there are no integers between

You might be interested in
Hello 10 points if my Chromebook is on 26 percent how much time do I have left theoretically
velikii [3]
About 15 minutes.......
7 0
3 years ago
Read 2 more answers
2. Which of the following statements accurately describes enzymes? A. Enzymes increase the activation energy of reactions. B. Te
Bas_tet [7]
B.temperatute and pH can affect how enzymes work
5 0
3 years ago
What is the biggest difference between a movie and a game?
sveta [45]

Answer:

It could be D

Explanation:

3 0
2 years ago
what is a tool or electrical system means intentionally creating a low-resistance path that connects to the earth
nikklg [1K]
A comper??><>?????????????????????????????????????
7 0
3 years ago
Your friend wants to know about Microsoft Expression Web 4.
Vlad [161]
Microsoft Expression Web 4 is 
--
Component of Expression Studio
--
Design and Develop Web Pages using HTML5, CC3, ASP.Net, and more
--
Requires .Net Framework & Silverlight 4.0
--
3 0
3 years ago
Other questions:
  • The ____ operation is used to add an element onto the stack.
    15·1 answer
  • The control programs managing computer hardware and software perform the _________ function to control and prioritize tasks perf
    8·1 answer
  • Select the correct answer.
    12·1 answer
  • To print a mailing label, click the Labels button on the MAILINGS tab in the ____ group. A. Building Block B. AutoText C. Templa
    10·2 answers
  • What was the technology that defined each of the four generations of computers?
    12·1 answer
  • Identify which statement explains why a programmer would break a logic problem into steps.
    13·2 answers
  • Please check my answer! (Java)
    7·1 answer
  • Que es un programa de ordenador?
    10·1 answer
  • What is the IEEE 802 standards name for a wireless network that is limited to one person's workspace?
    14·1 answer
  • How do you change your grade level
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!