Sample Input 2: 3 500 100 Sample Output 2: Average: 51.5 Error Rate (%): 33.33333333333333 Explanation 2: 3 means there are 3 inputs. Average of valid marks is (3+100)/2 = 103/2 = 51.5 500 is invalid....




Must show it in Python:



Please show step by step with comments.



Please show it in simplest form.



Please don't use any functions




Please don't use any def func ()


Sample Input 2:<br>3<br>500<br>100<br>Sample Output 2:<br>Average: 51.5<br>Error Rate (%): 33.33333333333333<br>Explanation 2:<br>3 means there are 3 inputs.<br>Average of valid marks is (3+100)/2 = 103/2 = 51.5<br>500 is invalid. So, there is 1 number out of 3 that is invalid. Hence the percentage = 1/3x100<br>= 33.33333333333333<br>

Extracted text: Sample Input 2: 3 500 100 Sample Output 2: Average: 51.5 Error Rate (%): 33.33333333333333 Explanation 2: 3 means there are 3 inputs. Average of valid marks is (3+100)/2 = 103/2 = 51.5 500 is invalid. So, there is 1 number out of 3 that is invalid. Hence the percentage = 1/3x100 = 33.33333333333333
Question:<br>Write a Python program that asks the user for quantity and takes some marks out of 100 as<br>input. Valid marks are 0 to 100. However, due to user error, some marks may fall outside<br>that range, say 101 or -5 (minus five). Print average of valid marks and percentage of invalid<br>marks (Error Rate). Assume there is at least one valid mark and at least one invalid mark.<br>Sample Input 1:<br>5<br>20<br>-3<br>105<br>70<br>100<br>Sample Output 1:<br>Average: 63.333333333333336<br>Error Rate (%): 40.0<br>Explanation 1:<br>5 means there are 5 inputs.<br>Average of valid marks is (20+70+100)/3 =190/3 = 63.333333333333336<br>-3 and 105 are invalid. So, there are 2 numbers out of 5 that are invalid. Hence the<br>percentage = 2/5x100 = 40.0<br>%3D<br>

Extracted text: Question: Write a Python program that asks the user for quantity and takes some marks out of 100 as input. Valid marks are 0 to 100. However, due to user error, some marks may fall outside that range, say 101 or -5 (minus five). Print average of valid marks and percentage of invalid marks (Error Rate). Assume there is at least one valid mark and at least one invalid mark. Sample Input 1: 5 20 -3 105 70 100 Sample Output 1: Average: 63.333333333333336 Error Rate (%): 40.0 Explanation 1: 5 means there are 5 inputs. Average of valid marks is (20+70+100)/3 =190/3 = 63.333333333333336 -3 and 105 are invalid. So, there are 2 numbers out of 5 that are invalid. Hence the percentage = 2/5x100 = 40.0 %3D

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here