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
Tju [1.3M]
4 years ago
7

A programmer wrote the program below. The program uses a list of numbers called numList. The program is intended to display the

sum of the numbers in the list. In order to test the program, the programmer initializes numList to [0, 1, 4, 5].
The program displays 10, and the programmer concludes that the program works as intended.

set! sum = numList [1]
FOR EACH value IN numList
set! sum = sum + value
DISPLAY sum

Which of the following is true?

A) The conclusion is correct; the program works as intended.
B) The conclusion is incorrect; the program does not display the correct value for the test case [0, 1, 4, 5].
C) The conclusion is incorrect; using the test case [0, 1, 4, 5] is not sufficient to conclude the program is correct.
D) The conclusion is incorrect; using the test case [0, 1, 4, 5] only confirms that the program works for lists in increasing order.
Computers and Technology
1 answer:
Nezavi [6.7K]4 years ago
8 0

Answer:

The conclusion is incorrect; using the test case [0, 1, 4, 5] is not sufficient to conclude the program is correct.

Explanation:

From the code snippet given, we cannot conclude that the test case is sufficient.

One of the reasons is because the test case contains only integer variables.

Tests need to be carried out for other large and floating points numerical data types such as decimal, double, float, etc. except that when it's known that the inputs will be of type integer only else, we can't rush into any conclusion about the code snippet

Another reason is that input are not gotten at runtime. Input gotten from runtime environment makes the program flexible enough.

Lastly, the array length of the array in the code segment is limited to 4. Flexible length needs to be tested before we can arrive at a reasonable conclusion.

You might be interested in
The memory process of retaining information received is called __________.
Phantasy [73]

The answer is C. Storing

4 0
4 years ago
Read 2 more answers
What are 3 important reasons to reconcile bank and credit card accounts at set dates?
Karo-lina-s [1.5K]

Answer:

To verify transactions have the correct date assigned to them.

To verify that an account balance is within its credit limit.

To verify that all transactions have been recorded for the period.

Explanation:

7 0
3 years ago
Help!! Best answer will get Brainliest!!
Eddi Din [679]

Answer:

answer(s):

-set goals

-select a topic

-write down research questions

Hope this helped and sorry for the bold. <3

Explanation:

6 0
3 years ago
Read 2 more answers
A computer may keep freezing if it's software is up-to-date? <br> True <br> False
tester [92]

Answer:

false

Explanation:

6 0
4 years ago
Edra wants to consolidate the data from each of the regions. Switch to the Consolidated Sales worksheet, then update the workshe
VashaNatasha [74]

Answer:

a. In cell A6, enter a formula without using a function that references cell A6 in the Washington worksheet.

b. Copy the formula from cell A6 to the range A7:A9 without copying the formatting.

Explanation:

Microsoft Excel is a spreadsheet application used for data analysis and statistical calculation. The worksheet is made of columns and rows like a table and labeled alphabetically and numerically respectively. Several worksheets can be referenced in an excel workbook

To consolidate data in excel, reference a cell from another worksheet in the formula of the current worksheet and copy the formula from the cell to a given range of cells, without copying the formatting of the cell.

7 0
3 years ago
Other questions:
  • What field in an IPv4 packet is altered to prioritize video streaming traffic over web surfing traffic?
    11·1 answer
  • The Python MySQL Connector library:
    15·1 answer
  • At the frequency of 2.4 GHz what is the free-space path loss in dB.
    9·1 answer
  • In Microsoft Access, what happens when you save a query once and run it but then add more to the query? What will happen? a)erro
    12·1 answer
  • Jamie is preparing a presentation on his laptop for his college annual event. He inserts audio and video files into the presenta
    11·2 answers
  • If we have 6 processes in a round-robin scheduler with a quantum of 20ms a piece, and we increase the priority of one process su
    14·1 answer
  • A discription of how child abuse displays itself on social media​
    6·1 answer
  • What does the revolver do computer science​
    9·1 answer
  • ANSWER ASAP! 50 POINTS!!!!
    10·2 answers
  • How to type an absolute reference formula in exel
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!