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
Theodor is researching computer programming. He thinks that this career has a great employment outlook, so he'd like to learn if
lakkis [162]

Answer:

The capability to program for a longtime and not burn out and to know a few coding languages as well as have the ability to learn new languages quickly.

4 0
2 years ago
Read 2 more answers
A person clicks on an ad of a fitness club in a blog on nutrition. The person conducts a search on yoga and moves to another web
Sloan [31]

Answer: the answer is B.

hope this help

3 0
3 years ago
Which of the following is not a property of a WAN:
docker41 [41]

Answer:

Option d is the correct answer for the above question.

Explanation:

  • WAN is a type of network that facilities network connection all over the world. It can connect every computer which is in anywhere in the world while the other technology like LAN and MAN is used for small area locations.
  • The above question asked that about that statement which is not the property of WAN and that is option d because it states that WAN is used to connect only small areas of computers, but it can connect all the computers of the world, while the other property is valid for WAN.
6 0
2 years ago
PLEASE HELP!!!!!!!!!!
Shtirlitz [24]
<em>If i was answering this question I would pick D. Because a job is an organization of people working there and the people that work there have a strategic roll on the organization they work for because that's how they make their living!
</em>
7 0
3 years ago
Read 2 more answers
What are the data types in access​
Julli [10]

Answer:

Data type in Microsoft Access Database

Text  

Memo  

Byte  

Integer

Long  

Single  

Double  

Currency  

AutoNumber  

Date/Time  

Yes/No  

Ole Object  

Hyperlink  

Lookup Wizard

Explanation:

4 0
3 years ago
Other questions:
  • You use Cat5e twisted pair cable on your network. Cables are routed through walls and the ceiling. A user puts a screw in the wa
    9·1 answer
  • What sugar is used in a DNA molecule​
    7·2 answers
  • The Quick Access Toolbar cannot be customized and have extra commands added to it
    5·1 answer
  • What is an objective of state-sponsored attackers?
    11·1 answer
  • Convert the binary number into a hexadecimal number.
    7·1 answer
  • (Please answer! Correct answer gets brainliest!)
    5·2 answers
  • In the ADT graph the methid addVertex has efficiency
    15·1 answer
  • ________ programming is a method of writing software that centers on the actions that take place in a program.
    8·1 answer
  • Which areas of a business would most benefit from using the Workday platform?
    7·1 answer
  • Write a list comprehension that creates a list containing the numbers that result from the values 1 through 10 being multiplied
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!