Question: TASK 3 : Write the function input _ array which prompts the user for a list containing non - negative integers or 0 . The

TASK 3: Write the function input_array which prompts the user for a list containing non-negative integers or 0. The user ends the list by entering a negative number or up to 15 integers.** Assume that the user will not enter more than 15 integers**. Store the list of integers into the array passed in as the first input parameter. Do NOT store the negative number to end user input (if that is how the user ends the list) into the array. The function returns the number of non-negative integers or 0 values entered by the user.TASK 4: Write the function count_keys which computes and returns the number of occurrences of a key value in a list.TASK 5: Write the procedure print_indices which displays the locations (array indices) of the key value in the list as a comma separated list delimited by <>. Note that the last input parameter contains the number of occurrences of the key value in the list. Make sure you use this parameter in your solution.Thoroughly test your program on different input. For example, test your program when the user does not enter any valid value or just a single valid value. These are called corner or boundary cases. Use the provided test cases as well.Be sure that there is a comment documenting each variable.Be sure that your if statements, for and while loops and blocks are properly in

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!