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
What steps should you take if your harassed online​
AURORKA [14]
Tell an adult and report the person harassing you
8 0
3 years ago
Read 2 more answers
WILL GIVE BRAINLEIST PLZ HELP PLZ AND THANK YOU
Anna35 [415]

Answer:

SIR I AM A BRAINLT MODERRATER U CAN NOT POST THINGS LIKE THIS  I LOOKED THIS UP AND ITS A TEST

Explanation:

3 0
3 years ago
How efficient would a 6-bit code be in asynchronous transmission if it had 1 parity bit, 1 start bit, and 2 stop bits?
Lana71 [14]
How efficient well if we are transmitting 6bits and we need 10 to transmit the 6 bits that would be 6/10 = .6 = 60% efficient.
7 0
3 years ago
The expressionvecCont.empty() empties the vector container of allelements.
Semenov [28]

Answer:

False

Explanation:

vector is like a dynamic array that has a special ability to resize automatically when it required.

vector has several functions:

like, insert() to insert the element in the vector.

delete() for delete the one element at a time.

empty() is also the function used in the vector. It is used for checking the vector is empty or not.

it gives the Boolean value (TRUE or FALSE), if the vector is empty it gives the output TRUE if the vector is not empty it gives the output FALSE.

It is not used for empty or deletes all elements of the vector.

Therefore, the answer is False.

4 0
3 years ago
Derek has an interest in designing video games. What requirements should he fulfill to be a game designer? To be a game designer
4vir4ik [10]

Answer:

2. Marketing, communication or advertising

Explanation:

5 0
3 years ago
Other questions:
  • Shut down and unplug the computer. Remove the CPU case lid. Locate the various fans, and then use compressed air to blow dirt ou
    13·2 answers
  • A collection of related files that serves as a foundation for retrieving information is a: byte
    12·1 answer
  • Computer-aided design software is used primarily by:
    13·1 answer
  • How to select the entire table in microsoft excel
    11·1 answer
  • Write code for iterative merge sort algorithm. It is also known as bottom-up merge sort. There should not be any recursive call
    14·1 answer
  • Jenny, a programmer, uses Microsoft Excel 2016 to generate data required for the programs she develops. She uses various functio
    10·1 answer
  • Pat practices on the keyboard to improve his typing speed. When he typed the sentence It was a rainy day, he missed typing the l
    6·1 answer
  • What is syntax?
    15·1 answer
  • suspect that several users are attempting to install unauthorized software. Upon researching, you discover that the attempts wer
    12·1 answer
  • PYTHON!
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!