A matrix named Marks has three columns (could have any number of rows). The first column stores the student ID, the second column stores

Answered step by step
Verified Expert Solution
Question
86 users unlocked this solution today!
A matrix named Marks has three columns (could have any number of rows). The first column stores the student Write a function that takes in such a matrix and a unit code as the inputs and calculates the percentage of

A matrix named Marks has three columns (could have any number of rows). The first column stores the student ID, the second column stores the unit ID and the third column stores the grade (all the value in Marks are numeric). For example, 6 Marks = [1234112 4140 1274814 4710 1538116 4140 1134215 4140 1534193 4180 67 76 36 77 69 POH ...] Note: the above values are just an example. Marks matrix can have any number of rows and different values, but with the above format. Write a function that takes in such a matrix and a unit code as the inputs and calculates the percentage of students who passed the given unit. A student is passed if the grade is 50 or above. The output of the function is the calculated pass percentage. The Pass percentage is defined as: Pass percentage = (number of passed students)/ (total number of students) * 100 If there are no students who had taken the given unit, then the output of the function should be 0. Copy and paste your function below. Paste as plain text (Ctrl+Shift+V) if normal paste (Ctrl+v) doesn't work.

Step by Step Solution

3.37 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Link Copied!

Step: 1

Here is a Python function to calculate the percentage of students who passed a given unit def calcul... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

100% Satisfaction Guaranteed-or Get a Refund!

Step: 2Unlock detailed examples and clear explanations to master concepts

blur-text-image_2

Step: 3Unlock to practice, ask and learn with real-world examples

blur-text-image_3

See step-by-step solutions with expert insights and AI powered tools for academic success

  • tick Icon Access 30 Million+ textbook solutions.
  • tick Icon Ask unlimited questions from AI Tutors.
  • tick Icon Order free textbooks.
  • tick Icon 100% Satisfaction Guaranteed-or Get a Refund!

Claim Your Hoodie Now!

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books
flashcard-anime

Study Smart with AI Flashcards

Access a vast library of flashcards, create your own, and experience a game-changing transformation in how you learn and retain knowledge

Explore Flashcards

Students Have Also Explored These Related Computer Network Questions!