Question
1. A class is divided into 2 groups: A and B. In group A, there are m students while in group B there are n
1. A class is divided into 2 groups: A and B. In group A, there are m students while in group B there are n students. All the students took 5 class tests each carrying 100 points.Write a program (in python) to take input scores for both A and B and by comparing their performance (in terms of group average score), conclude which group is performing better.
Example
input: ScoresA=[[90, 86, 78, 95, 80], [85, 75, 98, 82, 80], [87, 78, 93, 90, 75]]
ScoresB = [[85, 75, 98, 82, 80], [87, 78, 93, 90, 75], [76, 67, 98, 96, 75], [74, 94, 85, 86, 82]]
Output: Average Score of A=84.8
Average Score of B=83.8
Group A performs better.
2. Perform matrix multiplication for 2 matrices A[m x n], and B[p x q]. Check if the multiplication is doable before multiplying.
Input: A = [[1, 7, 3], [3, 5, 6], [6, 8, 9]] B = [[1, 1, 1, 2], [6, 7, 3, 0], [4, 5, 9, 1]]
Output : [55, 65, 49, 5] [57, 68, 72, 12] [90, 107, 111, 21]
det CompareGroups # get input m and scores for A # get input n and scores for B # Compute Overall average for A # Compute Overall average for B # Compare Ave rag(A) with Average(B) # Pint output. def MultiplyMatrixO:| # get input for A # get input for B # Check if multiplication is valid # Multiply and print the result matrixStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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