Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function average _ unit _ grade ( unit _ name, results ) that accepts as input a unit name and a table of
Write a function averageunitgradeunitname, results that accepts as input a unit name and a table of study results of various students and units and that returns as output the average grade of the given unit. The input table is expected to contain three columns: unit, student ID grade. You can assume that there is at least one result for the input unit name. For example: results 'Database', Operating Systems', Operating Systems', Java Fundamentals', Java Fundamentals', Mathematics Mathematics Information Systems', Note: Your solution may NOT use any imports.
Write a function averageunitgradeunitname, results that accepts as input a unit name and a table of study results
of various students and units and that returns as output the average grade of the given unit. The input table is expected
to contain three columns: unit, student ID grade. You can assume that there is at least one result for the input unit
name.
For example:
results 'Database',
Operating Systems',
Operating Systems',
Java Fundamentals',
Java Fundamentals',
Mathematics
Mathematics
Information Systems',
Note: Your solution may NOT use any imports.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started