In most universities, course grades are reported using a letter grade, i.e. A, B, ..., whereas...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In most universities, course grades are reported using a letter grade, i.e. A, B, ..., whereas the overall performance is reported using Grade Point Average (GPA). First, a number (typically in the range from 0 to 4) is assigned to each letter grade. The GPA is calculated by summing the weighted grade points (credit hours * numerical value of the grades) then dividing by the total amount of credit hours. So, for example suppose, consider the simplified grade scale that assigns letter grades of 'A', 'B', 'C', 'D', and "F", to grade points '4', '3', '2', '1', and '0', respectively. If your grades for Biology (3 credits), Math (4 credits). Computer Science (3 credits), and Physics (2 credits) are 'BBAD, then you GPA will be calculated as (rounded to a decimal digit) (3*3) + (43)+(3*4)+(2+1) 3+4+3+2 (a) Write a Python user-defined function that calculates the GPA on a scale of 0 to 4, as above. That is A = 4, B = 3, C = 2, D = 1, and F = 0. Your function should take two input vectors, 'Grades" containing the letter grades and 'Hours' containing the credit hours for each course in 'Grades'. It should output the GPA. Hint: You can consider using the following Python commands: sum, len, and if-elif-else. GPA 2.9 (b) Suppose your grades for a term are as stated in the example above. That is they are ['B', 'B', 'A', 'D'] for Biology (3 credits), Math (4 credits), Computer Science (3 credits), and Physics (2 credits). Your program should create two lists, one for the grades and one for their corresponding hours. It should then use your user-defined function from part (a) to calculate and display the resulting GPA. Important: You have to do this problem in Python. You will not receive any credit if you do this problem in Matlab. In your report, include your Python .py script file that should include your function file (with sufficient comments). In most universities, course grades are reported using a letter grade, i.e. A, B, ..., whereas the overall performance is reported using Grade Point Average (GPA). First, a number (typically in the range from 0 to 4) is assigned to each letter grade. The GPA is calculated by summing the weighted grade points (credit hours * numerical value of the grades) then dividing by the total amount of credit hours. So, for example suppose, consider the simplified grade scale that assigns letter grades of 'A', 'B', 'C', 'D', and "F", to grade points '4', '3', '2', '1', and '0', respectively. If your grades for Biology (3 credits), Math (4 credits). Computer Science (3 credits), and Physics (2 credits) are 'BBAD, then you GPA will be calculated as (rounded to a decimal digit) (3*3) + (43)+(3*4)+(2+1) 3+4+3+2 (a) Write a Python user-defined function that calculates the GPA on a scale of 0 to 4, as above. That is A = 4, B = 3, C = 2, D = 1, and F = 0. Your function should take two input vectors, 'Grades" containing the letter grades and 'Hours' containing the credit hours for each course in 'Grades'. It should output the GPA. Hint: You can consider using the following Python commands: sum, len, and if-elif-else. GPA 2.9 (b) Suppose your grades for a term are as stated in the example above. That is they are ['B', 'B', 'A', 'D'] for Biology (3 credits), Math (4 credits), Computer Science (3 credits), and Physics (2 credits). Your program should create two lists, one for the grades and one for their corresponding hours. It should then use your user-defined function from part (a) to calculate and display the resulting GPA. Important: You have to do this problem in Python. You will not receive any credit if you do this problem in Matlab. In your report, include your Python .py script file that should include your function file (with sufficient comments).
Expert Answer:
Answer rating: 100% (QA)
Question Answer Here below is the code for the given question in Python Programming Language Create ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Grade for a recent motion picture from 0 to 4 stars is what kind of variable? A. This variable is a continuous numerical variable that is interval-scaled. B. This variable is a discrete numerical...
-
For a prestatistics course, total course points are calculated by adding points earned on homework assignments, quizzes, tests, and the final exam. If the total of scores on tests is worth 1/2 of the...
-
If your cumulative grade point average is below 2.5 then you are encouraged to submit a statement reflecting on your past academic performance and future potential. If applicable, describe any...
-
Find the point (a, b) on the graph of y = ex where the value ab is the least.
-
On January 1, 2012, Valuation Allowance for Available-for-Sale Securities had a zero Balance. On December 31, 2012, the cost of the available-for-sale securities was $7, 600, and the fair value was...
-
What properties are typical for parts made from Zamak 3 zinc casting alloy?
-
Wilmot Real Estate Company experienced the following events during its first year of operations: 1. Received \($50,000\) in cash from investors as an equity investment. 2. Borrowed \($40,000\) in...
-
If Norm decides to put the decision to the appropriate production team, what are the potential problems? What would be the advantages? MINI CASE As Norm St. Laurent, operations manager for Oilwell...
-
Optional Question: Consider the project network shown below. Think about fast - tracking in the absence of resource constraints. Suppose activities 5 - 8 and 8 - 1 2 can be done in parallel. At what...
-
John Fuji (birthdate June 6, 1981) received the following Form W-2 from his employer related to his job as a manager at a Washington apple-processing plant: Johns other income includes interest on a...
-
7. A ball is projected upward at time t = 0.0 s, from a point on a roof 60 m above the ground. The ball rises, then falls and strikes the ground. The initial velocity of the ball is 71.6 m/s if air...
-
Does an SoS always have a centralized control?
-
What are the three features of an appropriate lexicon for SoS?
-
Where have you seen DAI-like process esimplemented in engineering? Dis-cuss examples of how Definition, Abstraction, and Implementation are used in the engineering disciplines.
-
Which of the following is NOT the barrier to successful SoS modeling and analysis? a. Tendency of fragmented perspectives for practical development b.Lack of mathematical understanding of physical...
-
Which of the following is NOT a source of complexity in an SoS? a. Uncertainty of requirements b.Multiplicity of perspectives among stakeholders c. Lack of diversity among components d. Unmodeled...
-
Simplify. (3x2+2x-8) - (2x 2-3x+3
-
Identify Thank You mission, strategy and core competencies. Identify strategy changes that have taken place at Thank You since its founding in 2008. Your answer must in text references and must be...
-
All values of a data set must be within s n 1of the mean. If a person collected 25 data values that had a mean of 50 and a standard deviation of 3 and you saw that one data value was 67, what would...
-
This table lists the numbers of officers and enlisted personnel for women in the military. At = 0.05, is there sufficient evidence to conclude that a relationship exists between rank and branch of...
-
The number of faculty and the number of students are shown for a random selection of small colleges. Is there a significant relationship between the two variables? Switch x and y and repeat the...
-
Market economies largely rely on a(n) _________ decision- making process, where literally millions of individual producers and consumers of goods and services determine what will be produced.
-
With no alternative use of the government purchases from a price floor, a(n) _________ will result because consumers are consuming _________ than the previous market equilibrium output and sellers...
-
Because of scarcity, certain economic questions must be answered regardless of the level of affluence of the society or its political structure. Three fundamental questions that inevitably must be...
Study smarter with the SolutionInn App