Using the knowledge in computational language in python it is possible to write a code that through a list manages to organize the largest and smallest numbers in order.
<h3>Writting the code in python:</h3>
<em># finding largest in the list</em>
<em>list_max = challenge3[0]</em>
<em>for i in range(len(challenge3)) :</em>
<em> if challenge3[i] > list_max :</em>
<em> list_max = challenge3[i] </em>
<em>print("largest in the list = ", list_max)</em>
<em># number of times largest occurs in list</em>
<em>max_count = 0</em>
<em>for i in range(len(challenge3)) :</em>
<em> if challenge3[i] == list_max :</em>
<em> max_count += 1 </em>
<em>print("number of times largest occurs in list = ", max_count)</em>
<em># finding second largest in the list</em>
<em>list_sec_max = challenge3[0]</em>
<em>for i in range(len(challenge3)) :</em>
<em> if challenge3[i] > list_sec_max and challenge3[i] < list_max :</em>
<em> list_sec_max = challenge3[i] </em>
<em>print("second largest in the list = ", list_sec_max)</em>
<em># number of times second largest occurs in list</em>
<em>sec_max_count = 0</em>
<em>for i in range(len(challenge3)) :</em>
<em> if challenge3[i] == list_sec_max :</em>
<em> sec_max_count += 1 </em>
<em>print("number of times second largest occurs in list = ", sec_max_count)</em>
<em># location of first occurence of largest in the list</em>
<em>first_index = -1</em>
<em>for i in range(len(challenge3)) :</em>
<em> if challenge3[i] == list_max :</em>
<em> first_index = i</em>
<em> break </em>
<em>print("location of first occurence of largest in the list = ", first_index)</em>
<em># location of first occurence of largest in the list</em>
<em>last_index = -1</em>
<em>for i in range(len(challenge3) - 1, -1, -1) :</em>
<em> if challenge3[i] == list_sec_max :</em>
<em> last_index = i</em>
<em> break </em>
<em>print("location of first occurence of largest in the list = ", last_index)</em>
See more about python at brainly.com/question/13437928
#SPJ1