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
Ymorist [56]
3 years ago
9

In this exercise, use the following variables : i,lo, hi, and result. Assume that lo and hi each are associated with an int and

that result refers to 0.
Write a while loop that adds the integers from lo up through hi (inclusive), and associates the sum with result.

Your code should not change the values associated with lo and hi. Also, just use these variables : i,lo, hi, and result.
Computers and Technology
1 answer:
Assoli18 [71]3 years ago
7 0

Answer:

result = 0

i = lo

while i <= hi:

       result = result + i

       i += 1

Explanation:

Initialize the <em>result</em> as 0 to hold the summation value.

Since we are asked not to change the value of <em>lo</em> and <em>hi</em>, our loop control variable is <em>i</em> and initially it starts from <em>lo.</em>

Since we are asked to add the number from <em>lo</em> to <em>hi, </em>while loop condition checks it.

While the condition satisfies (during each iteration), the value of <em>i</em> is added to the result and the value of <em>i</em> is incremented by one.

You might be interested in
The
saveliy_v [14]
The answer is Undo I think
4 0
3 years ago
Read 2 more answers
1. Write a 400-500 word research report about Burke High School.
fenix001 [56]

Answer:

when is it due

Explanation:

6 0
3 years ago
Why are iterators useful?
Marina CMI [18]
It is d because I said it is
6 0
3 years ago
Stateful packet inspection firewalls ________. always do application content filtering have the slow speed of relay operation Bo
Evgesh-ka [11]

Answer:

Neither always do application content filtering nor have the slow speed of relay operation.

Explanation:Stateful packet inspection is a dynamic firewall filtering which filters the inflow and outflow of packets of Information from time to time. It is also known to act as monitor for the state of a connection in a Network system. The filtering decisions of a stateful inspection firewall is based on two facts

(1) The rules defined by the administrator

(2) The previous context developed based on the filtering that taken place before.

6 0
3 years ago
What is one advantage of using a relational database over a spreadsheet or flat file to store data?
Elis [28]
A relational database<span> is a digital database. It is collection of data items organized in tables from which data can be accessed or reassembled in many different ways without having to reorganize the </span>database<span> tables. There are several advantages of using a relational database over a spreadsheet or flat file to store data. Some of them are:
</span><span>- No multiple record changes are needed
- The storage is more efficient storage
- It is simpler to delete or modify details.<span>
</span></span>- Complex queries can be carried out<span>.
</span>- Better security. 
8 0
4 years ago
Read 2 more answers
Other questions:
  • Alex has started a Google Search campaign designed to promote his online motorcycle accessories store. His store focuses on cust
    6·1 answer
  • . Alex discovered a bunch of SATA drives in a box at the office and needs to check the contents. What can he do so that Windows
    13·1 answer
  • __________ is an attempt to gain access to a network by posing as an authorized user in order to find sensitive information, suc
    5·1 answer
  • List three examples of observations of earth by remote-sensing satellites
    6·1 answer
  • The data manipulation language (DML) of SQL contains SELECT, INSERT, DELETE, and UPDATE statements, whereas the data definition
    12·1 answer
  • Which of the following statements is correct? Group of answer choices An object of type Employee can call the setProjectName met
    11·1 answer
  • Lol fortnite really going UwU and anime
    12·2 answers
  • A wide-angle lens corrected for barrel distortion is called a(n)<br> lens.
    5·1 answer
  • What are the different types database of end users? Discuss the main activi-ties of each
    6·2 answers
  • Your design company needs to create a sample animation for a client very quickly. You already have the basic graphics, and the c
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!