Question: #2 The cell below contains the variable assessment_scores. The variable represents student performance on two assessments. Each row represents a student. Use numpy functions only
#2
The cell below contains the variable assessment_scores. The variable represents student performance on two assessments. Each row represents a student. Use numpy functions only to return the percentage of the rows where the sum of the assessments is greater than 80.
import numpy as np
assessment_scores = np.array([
[20,40],
[40,60],
[35,50],
[50,50],
[22, 26],
[44, 38],
[44, 52]
])
def return_percentage_greater_than_80(arr):
'''
Return the percentage of the rows in arr where the sum of the two values is greater than 80.
*You should use numpy to do this.*
Parameters
==========
arr: 2 dimensional numpy array
Returns
======
percentage: float
'''
return arr
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
