Computers and Technology

As of Spring 2020, in otder to get into the CS major, you must have a 3.0 GPA or better in cs120, cs210, and cs245. In this problem, you should write one function named get_gpa, which will calculate this GPA. This function should have one parameter, which will be a dictionary of grades in computer science courses. You can assume that the dictionary will always have the keys 'cs120', 'cs210', and 'cs245', but it also might contain some names of other courses too. The values associated with each key will be a float representeing the GPA-style grade for that class. For instance, the parameter dictionary might look like: {'cs120':4.0 'cs245':3.0, 'cs210':2.0}. Some examples: get_gpa({'cs110': 4.0, 'cs245':3.0, 'cs335':4.0, 'cs120':3.0, 'cs210':3.0}) should return 3.0.
get_gpa({'cs110': 4.0, 'cs120':3.0, 'cs245':2.0, 'cs210':1.0}) should return 2.0.
get_gpa({'cs245':4.0, 'cs120':3.0, 'cs245':2.0}) should return 3.0.

Make sure to include only the one function in your file.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:30, lesok0818
Advantages and disadvantages of binary system
Answers: 1
image
Computers and Technology, 23.06.2019 12:00, kp2078
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
image
Computers and Technology, 23.06.2019 15:20, headshotplayzcod
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
image
Computers and Technology, 24.06.2019 15:00, firdausmohammed80
Universal windows platform is designed for which windows 10 version?
Answers: 1
Do you know the correct answer?
As of Spring 2020, in otder to get into the CS major, you must have a 3.0 GPA or better in cs120, cs...

Questions in other subjects:

Konu
Mathematics, 09.02.2022 18:10