Question: integer num _ samples is read from input, representing the number of data samples to be read from input. List input _ list contains the

integer num_samples is read from input, representing the number of data samples to be read from input. List input_list contains the data samples read from the remaining input. For each element in input_list:
If the element is greater than 45, output 'Sample ' followed by the element's index in the list and ' is flagged'.
Otherwise, output 'Sample ' followed by the element's index in the list and ' passed'.
Click here for example
Ex: If the input is:
3
40
45
60
then the output is:
Sample 0 passed
Sample 1 passed
Sample 2 is flagged

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 Databases Questions!