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
Write a function sumOfMultiples, that inputs two integers - seed and cap. The function should return the sum of all the multiple
ryzh [129]

Answer:

HUHUHU+×÷OLOLOLOLO = i dont know

6 0
2 years ago
Which of the following best describes professional behavior in the IT field?
Ray Of Light [21]
Answer - teaching others about technology in order to increase IT knowledge in the community
4 0
3 years ago
In cell N2, enter a formula using the IF function and structured references as follows to determine which work tier Kay Colbert
sattari [20]

The IF Function based formula that can be entered into cell N2 that will return 2 if true, and 1 if false is =IF(M2 >=4, 2, 1).

<h3>How is the IF function used?</h3>

An IF function allows us to be able to sort through data by analyzing data to find out if it conforms to a certain characteristic that we are looking for.

If the data corresponds, the IF function will return a value that means True, but if it doesn't, the value returned would be false.

After typing in the IF function, the next thing to do is specify the cell where the data you want to analyze is. In this case that data is in cell M2. You immediately follow this up by the parameter being compared.

In this case, we want to know if the figure in cell M2 is greater or equal to 4 so the next entry is M2>=

The next entry is the return if the comparison is true. In this case, the number for true is 2 and the one for false is 1. The full formula becomes:

=IF(M2 >=4, 2, 1).

In conclusion, the function is =IF(M2 >=4, 2, 1).

Find out more on the spreadsheets at brainly.com/question/1429504.

#SPJ1

8 0
1 year ago
I can create spreadsheets in Google Draw. False True
Over [174]
False, it's usually only in google sheets.
5 0
3 years ago
Read 2 more answers
You can use pen and highlighter tools to emphasize information on a slide during a PowerPoint presentation. These tools are avai
11111nata11111 [884]
C. slide show toolbar

7 0
3 years ago
Other questions:
  • Write a program that checks for car mileage. if the mileage is greater than 100000, display "clunker!". if not, display "buy it!
    7·1 answer
  • Why are specification for food processing tool,equipmentand untensils necessary?​
    8·1 answer
  • Explain what middleware is. Name a common middleware in two-tier client/server architecture for database applications.
    10·1 answer
  • HELP ASAP!!!
    7·1 answer
  • Big Project, Giving 5 stars, a Thanks, 80 points, and Branliest to whoever answers them correctly
    9·2 answers
  • If, when asked for a date of birth, the user enters a future date, this error should be caught by a ________ check.
    8·1 answer
  • If cells A1=90,A2=85,A3=80,A4=75, A5=75.What will be the formula if you are going to get the formula total
    5·1 answer
  • What keyboard functions lets you delete words
    9·2 answers
  • I need help I have questions I need answers in coding html,css,js and python.Fast
    7·1 answer
  • Write long answer to the following question. a. Define microcomputer. Explain the types of microcomputers in detail.​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!