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
Which computer applications can Mr. Crowell use to make the classroom learning more stimulating and interesting? Mr. Crowell has
katovenus [111]

Answer:

He can use following computer program to make the class room more interesting and effective:-

  • 1. <u>Reference software</u> : This software help students to access the atlases and dictionaries.Teacher can include this software in research projects .

  • 2. <u>Educational Games</u>: This types of software is very effective for younger children because it motivates them to learn.This software companies have combined gaming and education into one .

  • 3. <u>Graphical software</u> : Student can use this software to create and changes images available on the internet itselfs .
4 0
3 years ago
Read 2 more answers
Use System.DateTime along with System.Console to implement a simple C# program that does the following:_______.
Andre45 [30]

Answer:

5

Explanation:

I did it to and it was right

3 0
3 years ago
What is “GoF” and how does it relate to design patterns?
tatuchka [14]

Answer:

GOF refers to the gang of four pattern that are generally consider the basic for all the other patterns. Design pattern are basically provide the solution to the software design to resolve all problems that are associated with the development of real world applications.

GOF Design pattern implemented the parts of the re-usable object oriented software applications. The main aim of design pattern is to pass all the structural design pattern. Design pattern is the most powerful and helpful tool for the software developer and architecture.  

3 0
3 years ago
When you sustain program implementation by staying true to the original design, it is termed A. Goals and objectives B. Program
Naya [18.7K]

Answer:

Program fidelity

Explanation:

7 0
3 years ago
How can you continue learning about computer science and improve your coding abilities?
Crank

Answer:

5 Ways to Improve Your Coding and Programming Skills

Take advantage of books and other free resources. ...

Sign up for a bootcamp. ...

Practice, practice, practice. ...

Engage with the computer science community. ...

Pursue a formal education in computer science.

7 0
3 years ago
Other questions:
  • The ______ identifies the path for the currently open folder
    8·2 answers
  • .2. What approach to deviance do you find most persuasive: that
    9·1 answer
  • The ________ phase in a project involves documenting lessons learned from the project, so that the experience is useful to other
    13·1 answer
  • Cookies are to improve the access of internet information. Therefore for the sake of you own privacy and security you should not
    8·2 answers
  • What social impact did the gunpowder have on society?
    12·1 answer
  • An application ________ is anyone who writes a computer application for one or more platforms.
    5·1 answer
  • Which of the following is NOT areserved word in Java?intpublicstaticnum
    9·1 answer
  • Match each role to the corresponding web development task.
    14·1 answer
  • How do I create a simple percentage function to gather a score for a quiz in PHP?
    14·1 answer
  • Which privacy protection uses four colors to indicate the expected sharing limitations that are to be applied by recipients of t
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!