Question: We work with the function exam _ percentage _ rule, which implements the computation of your exam percentage according to our syllabus. Implement the function

We work with the function exam_percentage_rule, which implements the computation of your exam
percentage according to our syllabus. Implement the function using a LAMBDA:
LAMBDA(TH,E_1,E_2,M_1,M_2,LET(...))
The connection to the syllabus should be easy: TH (Take Home), E_1(Exam 1), E_2(Exam 2), M_1
(Makeup 1), M_2(Makeup 2). In each exam, you can make between 0 and 100 points. Please carefully
review the relevant parts of the syllabus, which serves as specification for what needs to be implemented.
Your function must use the MAX function to implement the rule regarding TH and E_1.
Could you implement the following versions of function exam_percentage_rule?
OneStep version. The function works correctly for one student.
Manual ManySteps version. The function works correctly for five students by dragging down the
OneStep formula five rows.
Automatic ManySteps version using MAP. Fill out the Function Recipe only for this corrected
solution. The function must work correctly for any number of students. This is intended for a large
MOOC class that might have 500 students. The following function almost solves the problem but
requires a correction.
=LAMBDA(TH,E_1,E_2,M_1,M_2,LET(
COMMENT0,"Calculate exam percentage many students (weighted percentage)",
COMMENT1,"Function for make-up exam rule. make-up exam =0 means: exam not taken",
override,LAMBDA(exam,mu_exam, IF(mu_exam=0,exam,mu_exam)),
exam_weights, {0.06,0.25,0.25},
TH_real,MAX(TH,E_1),
TH_real_1,MAP(TH,E_1,LAMBDA(t,e,MAX(t,e))),
TH_real_2,IF(E_1>TH,E_1,TH),
E_1_real,override(E_1,M_1),
E_2_real,override(E_2,M_2),
unweighted_exam_percentages,HSTACK(TH_real,E_1_real,E_2_real),
weighted,exam_weights*unweighted_exam_percentages,
result,BYROW(weighted,LAMBDA(row,SUM(row))),
ShowHeader,HSTACK("exam_weights","","","TH_real","E_1","E_2","weighted","","","result"),
Show, IFERROR(VSTACK(
ShowHeader,
HSTACK(
IFERROR(exam_weights,"exam_weights problem"),
IFERROR(TH_real,"TH_real problem"),E_1_real,E_2_real,weighted,
IFERROR(result,"result problem"))),""),
Show))(GradeT[TH],GradeT[E_1],GradeT[E_2],GradeT[M_1],GradeT[M_2])
Our task is to write a function that computes the grade for any number of students without using dragging.
In this situation, we need to look for non-spilling functions like MAX, MIN, SUM, AND, OR that are
aggregators, i.e., they produce one output. We have multiple options available.
Use the MAP function to reduce the problem to single-cell arguments.
Rewrite the function so that it becomes spilling. For example, AND(a,b) can be rewritten as a b =1,
which is spilling. TRUE has value 1 and FALSE has value 0.
Use BYROW and HSTACK to apply the function row by row. But this has limitations.
Create a worksheet called Exam Percentages and put all three versions of the function exam_percentage_rule
in it. Create the Excel table GradeT given below. For the first version use the first row of GradeT. For
the second version use all 5 rows through dragging. For the third version, give all 5 rows as input.
TH E_1 E_2 M_1 M_2
100085100100
0100100
508090100100
050
5010095
Test your solution carefully. For table GradeT, the output should be:
56
56
54.8
15.5
54.75
Note that 44% are allocated for the non-exam grade

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!