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
eimsori [14]
3 years ago
11

In a List of Positive Integers, Set MINIMUM to 1. For each number X in the list L, compare it to MINIMUM. If X is smaller, set M

INIMUM to X.” Read this STATEMENT very carefully and Answer the below Questions.
A. Will this Algorithm RUN?? Yes or No with a justification

B. Will X Replace Any Value or Not?
Computers and Technology
1 answer:
Dvinal [7]3 years ago
4 0

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The given problem scenario is:

In a List of Positive Integers, Set MINIMUM to 1. For each number X in the list L, compare it to MINIMUM. If X is smaller, set MINIMUM to X.

The answer to question A is: this algorithm will not run because:

If you a list of a positive number and you have already set it MINIMUM to 1, the comparison result with MINIMUM will not obtain. For example, lets suppose a list of numbers L. L={1,2,3,1,1,5,4,3,2}. You have already set the Minimum to 1. When you compare each number X in the list, if X >MINIMUM, then set MINIMUM to X.  

This will not work, because there are positive numbers in the list and the minimum positive number is 1. So the algorithm, will not execute the if-part.

In short, the pseudo-code of this problem is given below:

<em>L={list of positive number e.g. 1,2,3,.......Xn}</em>

<em>MINIMUM=1</em>

<em>foreach ( X in L)</em>

<em>{</em>

<em>(if X<MINIMUM)</em>

<em>    { </em>

<em>        MINIMUM=X</em>

<em>    }</em>

<em>}</em>

The answer to question B is X will not be replaced because X  replaced with MINIMUM only when if-part of this algorithm get executed. However, it is noted that X will not replace any value, if if-part will get executed, the Variable MINIMUM will get replaced with any value.

You might be interested in
I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
mihalych1998 [28]

Answer:

Use font colors that work well with your background.

Select font sizes that are appropriate for your delivery method.

Fonts should be appropriate for your audience.

Limit the number of fonts you use to three or four.

Hope this helps!

3 0
3 years ago
While researching ideas for cutting energy costs is his company. Hector watches an online video in which a business expert says,
Nataliya [291]
B. Put it in quotes if it is directly quoted as is and cite the source. You should likely also list the source in the works cited but not the phrase itself.
6 0
2 years ago
Read 2 more answers
It's best to use assertive speech when you<br> I want to show respect. *<br> True<br> False
mestny [16]

Answer:

True

Explanation:

Hope this helps :)

6 0
3 years ago
Read 2 more answers
Write the name of the tab, the command group, and the icon that you need to use to justify
Dafna11 [192]

Answer:

Tab: Home Tab

Command Group: Paragraph

Icon: Justify Icon

<em>The icon has no name; rather it is represented by 4 horizontal lines that are aligned on both edges</em>

<em />

Explanation:

To answer this question, I'll make use of the following attachment

<em>Where</em>

<em>1- represents the home tab</em>

<em>2 - represents the paragraph</em>

<em>3 - represents the justify icon</em>

<em />

3 0
3 years ago
Microsoft word's spell checker
natka813 [3]
A, will also check word usage
7 0
3 years ago
Read 2 more answers
Other questions:
  • To add and remove chart elements, you can use the add chart element button in the charts layout group on the ____ tab.
    6·1 answer
  • How to copy music from windows media player to pc?
    13·1 answer
  • ____ refers to data, applications, and even resources stored on computers accessed over the Internet. Answer
    5·1 answer
  • Which resource helps a user access a cloud service?
    8·1 answer
  • How can you create the first row of the table as the header of the table?
    14·2 answers
  • Managers looking for advice on properly dealing with obsolete technology hardware can: a) consult the e-Stewards program b) seek
    9·1 answer
  • A port is the point at which a peripheral device attaches to or communicates with a computer or mobile device. True False
    15·1 answer
  • Write a paragraph discussing privacy issues on the internet<br> and their impact on human lives.
    9·1 answer
  • 1 point
    13·1 answer
  • HELP ME ILL GIVE BRAINLY Input 50 numbers and then output the average of the negative numbers only. Write in pseudocode!
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!