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]
3 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]3 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
What image format should be used to keep the file size manageable​
Verizon [17]

The most simple and reliable image file formats out there are png and jpg

6 0
3 years ago
A _______ policy states that the company may access, monitor, intercept, block access, inspect, copy, disclose, use, destroy, or
wariber [46]

Answer: Company rights

Explanation:

A company rights policy states that the company may access, monitor, intercept, block access, inspect, copy, disclose, use, destroy, or recover using computer forensics any data covered by this policy.

It is one of the most important documents governing the rights of a company.

6 0
3 years ago
Any software or program that comes in many forms and is designed to disrupt the normal operation of a computer by allowing an un
Paha777 [63]
<span>Any software or program that comes in many forms and is designed to disrupt the normal operation of a computer by allowing an unauthorized process to occur or by granting unauthorized access is known as: Malicious code
Malicious code is often created to steal some information from another user without they realizing it, such as address, credit card number, social security number, email password, etc.</span>
4 0
3 years ago
Jason works as an accountant in a department store. He needs to keep a daily record of all the invoices issued by the store. Whi
kotykmax [81]

Are there any options

3 0
3 years ago
Read 2 more answers
Where should you look for most objective and unbaised information
jekas [21]
Google, would be the best because of all of the different site, hope this helps!
: )
8 0
3 years ago
Other questions:
  • Why is it important to have regular maintenance and care of your office equipment?
    5·1 answer
  • How do you change exposure to allow for greater DoF
    10·1 answer
  • Select the correct answer.
    13·1 answer
  • Select the correct answer.
    6·2 answers
  • Google Glass, glasses that allow you to take pictures and search online by speaking commands, are introduced at a technology tra
    8·1 answer
  • A business that helps people find jobs for a fee
    12·1 answer
  • Can someone please give me timetable managment system with data structures in java?
    11·2 answers
  • Please hurry!
    15·2 answers
  • PLEASE I NEED HELP FAST
    8·1 answer
  • What is not recyclable in a<br> hybrid car<br> hydrogen car<br> petrol car
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!