subject

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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Kyle, a receptionist for a building supply company, recently won an award for saving his company money on their phone system. after being presented with kyle's research, the company changed the way in which it made long-distance phone calls and cut their expenses in this area by 75 percent. the new system the kyle's company most likely adopted was wired communications switching stations voip hdtv
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
[java] create an application called registrar that has the following classes: a. a student class that minimally stores the following data fields for a student: - name - student id number - number of credits - total grade points earned and this class should also be provides the following methods: - a constructor that initializes the name and id fields - a method that returns the student name field - a method that returns the student id field - methods to set and retrieve the total number of credits - methods to set and retrieve the total number of grade points earned. - a method that returns the gpa (grade points divided by credits) b. an instructor class that minimally stores the following data fields for an instructor: - name - faculty id number - department the following methods should be provided: - a constructor that initializes the name and id fields - methods to set and retrieve the instructor’s department. c. a course class that minimally stores the following data for a course: - name of the course- course registration code- maximum number of 35 students- instructor- number of students- students registered in the course (an array)the following methods should also be provided: - a constructor that initializes the name, registration code, and maximum number of students- methods to set and retrieve the instructor- a method to search for a student in the course; the search should be based on an id number.- a method to add a student to the course. if the course is hill, then an exception with an appropriate message should be raised (try creating your own exception class for this). also, be sure that the student is not already registered in the course. the list of students should be in the order that they registered.- a method to remove a student from the course. if the student is not found, then an exception with an appropriate message should be raised (use the same exception class mentioned a method that will allow course objects to be output to a file using object serialization- a method that will allow course objects to be read in from a file created with object serializationyou will note that the student and instructor classes described above have some commonality. create aperson class that captures this commonality and uses it as a base class for student and instructor. this class should be responsible for the name and id fields and also provide atostring method that returns a string of the form name, id. this will be the inheritedtostring method for the student and instructor classes.1. draw a uml diagram for diss application.2. implement the previous classes in java. write a main program that can serve as a test class that tests all of the methods created and demonstrates that they are working
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
You know the right 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
question
Computers and Technology, 10.11.2020 17:50
question
Mathematics, 10.11.2020 17:50
question
English, 10.11.2020 17:50
Questions on the website: 13722367