Question 6: Write a function that receives 3 assignment grades, al, a2, a3, and a final grade, f, for a student and returns the corresponding letter grade of the student. The weights for the assignments and the final are 0.2, 0.2, 0.2, and 0.4, respectively. You can use the following table for matching grades to letters: 95-100 -> A1 -> A2 -> A3 -> B1 -> B2 -> B3 -> C1 -> C2 -> C3 -> D -> F 90-94 85-89 80-84 75-79 70-74 65-69 60-64 55-59 40-54 0-39 For example, compute_letter(80, 60, 40, 70) returns "C2" because 80 * 0.2 + 50 * 0.2 + 40 * 0.2 + 70 * 0.4 - 62 and 62 corresponds to C2. Note that, you are expected to do rounding. For example, 39.4 is F, whereas 39.5 is D. You can use the builtin round () function for this. Please google this function and learn how to use it. def compute_letter(al, a2, a3, f): # Remove this line before you answer this question. If you will NOT answer # this question, then do NOT remove this line. return

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

This is a PYTHON question, I need the problem really step by step, careful solving with all comments in every line

Question 6:
Write a function that receives 3 assignment grades, al, a2, a3, and a final
grade, f, for a student and returns the corresponding letter grade of the
student. The weights for the assignments and the final are 0.2, 0.2, 0.2, and
0.4, respectively. You can use the following table for matching grades to
letters:
95-100 -> A1
-> A2
-> A3
-> B1
-> B2
-> B3
-> C1
-> C2
-> C3
-> D
-> F
90-94
85-89
80-84
75-79
70-74
65-69
60-64
55-59
40-54
0-39
For example, compute_letter (80, 60, 40, 70) returns "C2" because
80 * 0.2 + 50 * 0.2 + 40 * 0.2 + 70 * 0.4 = 62
and 62 corresponds to C2.
Note that, you are expected to do rounding. For example, 39.4 is F, whereas 39.5
is D. You can use the builtin round () function for this. Please google this
function and learn how to use it.
def compute_letter(al, a2, a3, f):
# Remove this line before you answer this question. If you will NOT answer
# this question, then do NOT remove this line.
return
Transcribed Image Text:Question 6: Write a function that receives 3 assignment grades, al, a2, a3, and a final grade, f, for a student and returns the corresponding letter grade of the student. The weights for the assignments and the final are 0.2, 0.2, 0.2, and 0.4, respectively. You can use the following table for matching grades to letters: 95-100 -> A1 -> A2 -> A3 -> B1 -> B2 -> B3 -> C1 -> C2 -> C3 -> D -> F 90-94 85-89 80-84 75-79 70-74 65-69 60-64 55-59 40-54 0-39 For example, compute_letter (80, 60, 40, 70) returns "C2" because 80 * 0.2 + 50 * 0.2 + 40 * 0.2 + 70 * 0.4 = 62 and 62 corresponds to C2. Note that, you are expected to do rounding. For example, 39.4 is F, whereas 39.5 is D. You can use the builtin round () function for this. Please google this function and learn how to use it. def compute_letter(al, a2, a3, f): # Remove this line before you answer this question. If you will NOT answer # this question, then do NOT remove this line. return
Expert Solution
steps

Step by step

Solved in 4 steps with 7 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY