100 students take an exam and each gets an integer mark between 0 and 100, but 10 of the 100 students are absent on the day and receive a 0. The marks are stored in an R variable called marks and you are interested in calculating the average mark of the students that DID take the exam. Which of the following expressions can be used to compute this? For this question, you can assume that none of the students who attended the exam received a 0.多项选择题

题目图片
A

a. mean(marks[marks > 0])

B

b. mean(marks[marks != 0])

C

c. mean(marks>0)

D

d. mean(marks[marks>=0])

E

e. sum(marks) / sum(marks > 0)

F

f. sum(marks[marks > 0]) / sum(marks > 0)

登录即可查看完整答案

我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!