- 2
A set of marks that students have scored in the last semester was given below. Write code to determine how many are 90 or above.
Please tell me
9 Réponses
+ 3
And I also forgot that americans are experts in sarcasm.
+ 3
Marks=[90, 23, 95, 61, 80, 70, 92]
j=0
for i in Marks:
if i >=90:
j++
print ("Number of students having score 90 or above is ",j)
+ 3
You can use the filter function with a lambda, passing the marks to it and then get the length of the resulting filter object converted to a list.
len(list(filter(lambda x: x >= 90, marks)))
+ 2
Prerna 💞 congratulations for spoon-feeding the original poster
0
I forgot that indians don't understand sarcasm.
- 2
Means what