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
Alinara [238K]
2 years ago
15

Write a program that asks the user to enter two integer numbers X and Y. The program halves each number between X and Y then pri

nts the values on the screen. For example: If X=5 and Y=7, the program prints the following values 5/2=2.5, 6/2=3.0 and 7/2=3.5 Sample run 1: Enter X and Y: 5 7 2.5 3 3.5 Sample run 2: Enter X and Y: 15 10 5.0 5.5 6.0 6.5 7.0 7.5

Computers and Technology
1 answer:
QveST [7]2 years ago
5 0

Answer:

`I wrote a quick script in Python, to get you started a little basic and doesn't cover much but it works

Explanation:

starting off x = input(...) and y = input(...) is simply grabbing the input from the users then I make a base array vals defined like:

vals = []

to store the calculated results

rx = int(x) and ry = int(y), are simply converting the x, y which are strings into a int type, so I can use them on this line:

for i in range(rx, (ry + 1)):

I added the + 1 to ry because the range ends at the number before Y, example:

for i in range(5, 8):

 print(i) -> 5,6,7

with all of that I simply ran an iteration <em>for loop</em> and calculated and store the results into vals presented here:

vals.append(i / 2)

If there's any confusion leave a comment I'll try my best to help out

You might be interested in
Do rats smell good? what do you think
irina1246 [14]

Answer:

Rats are not smelly animals. They are actually extremely clean animals and should not smell bad at all. ... A sick rat odor will smell like infection. Most likely if you are smelling your rats it is due to the cage and bedding not being cleaned often enough or from using the wrong type of litter and bedding.

Explanation:

7 0
3 years ago
Read 2 more answers
I do not understand what the are asking in csys 1.3.6
Amiraneli [1.4K]

Can i see the note????

6 0
2 years ago
5 examples of a linear motion in object.
NNADVOKAT [17]

An example of linear motion is an athlete running 100m along a straight track. Linear motion is the most basic of all motion. ... Neglecting the rotation and other motions of the Earth, an example of linear motion is the ball thrown straight up and falling back straight down.


3 0
3 years ago
Three PCs are on an Ethernet LAN, connected by a hub. Describe how the Ethernet protocol deals with collisions in this situation
sdas [7]

Answer:

All the ports in a hub are in the same collision domain and a hub sends frames from one host to all other hosts in the network. This makes it prone to collision and poor network throughput. Just like a network switch, it uses the CSMA/CD protocol to detect collision in its network.

A network switch reduces its collision domain to just a port and sends frames from one host to another using its mac table as a route. This makes the network very efficient with high throughput. It also uses the CSMA/CD protocol to detect collision

Explanation:

Switches and hubs are used in networking to connect computer devices in a network. A hub is an obsolete device networking that broadcast a frame to all other ports or host in the network except for the send host port. This increases the rate of collision as all the ports in a hub share the same collision domain. A switch is an efficient frame switching device in a network, which uses its MAC table to decide and find a destination host.

CSMA/CD is a collision detection protocol used in a network to detect and prevent a collision. With this protocol, a host is able to listen, wait, send and resend frames to prevent a collision.

3 0
3 years ago
How impactful were shipping errors on customer questions.
Bumek [7]

Answer:

It's due to damage of goods

7 0
2 years ago
Other questions:
  • The Windows Group Policy feature provides __________ that govern the way Windows operates in enterprise environments. a. a centr
    8·1 answer
  • Kieran wants to search a database quickly for information on the last time a patient came to his medical facility. This informat
    10·2 answers
  • What are some beginning keyboarding questions?
    10·2 answers
  • Match the challenge with the term or process that offers a solution.
    6·1 answer
  • How can a user preview the playback of an audio clip in PowerPoint? Use the drop-down menus to complete the statements.
    14·1 answer
  • What is the primary difference between 3g and 4g cellular systems? 4g systems have greater transmission speeds. 3g systems are u
    5·1 answer
  • Which branch of science helps avoid or minimize stress-related injuries at workplace?
    14·2 answers
  • Implement a program that manages shapes. Implement a class named Shape with a method area() which returns the double value 0.0.
    15·1 answer
  • What is impact of Internet<br> in our lives
    7·1 answer
  • Is(are) input value(s) to use with a program to test the accuracy of the output.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!