write it in python

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

write it in python

Write a program that will take Student names and their marks in different
courses as input. Your task is to calculate the GPA of the students from
course marks and create a dictionary that will contain the student names
given as input as Key and their GPA as the corresponding value. At the end
of the program print the dictionary that you created. For simplicity you
can consider all the courses are 3.0 credit hours long. The program will
continue to take inputs unless “STOP" is given as input.
Grading policy is as follows:
Marks >=90, Grade: 4.0
90> Marks>=85, Grade point: 3.7
85>Marks>=80, Grade point: 3.3
80>Marks>=75, Grade point: 3.0
75>Marks>=70, Grade point: 2.7
70>Marks>=65, Grade point: 2.3
65>Marks>=60, Grade point: 2.0
60>Marks>=57, Grade point: 1.7
57>Marks>=55, Grade point: 1.3
55>Marks>=52, Grade point: 1.0
52>Marks>=50, Grade point: 0.7
Marks<50, Grade point: 0.0
And the formula to calculate GPA is:
GPA = sum(Each course grade point * credit of each course) / (Total
credits attended)
%3D
Transcribed Image Text:Write a program that will take Student names and their marks in different courses as input. Your task is to calculate the GPA of the students from course marks and create a dictionary that will contain the student names given as input as Key and their GPA as the corresponding value. At the end of the program print the dictionary that you created. For simplicity you can consider all the courses are 3.0 credit hours long. The program will continue to take inputs unless “STOP" is given as input. Grading policy is as follows: Marks >=90, Grade: 4.0 90> Marks>=85, Grade point: 3.7 85>Marks>=80, Grade point: 3.3 80>Marks>=75, Grade point: 3.0 75>Marks>=70, Grade point: 2.7 70>Marks>=65, Grade point: 2.3 65>Marks>=60, Grade point: 2.0 60>Marks>=57, Grade point: 1.7 57>Marks>=55, Grade point: 1.3 55>Marks>=52, Grade point: 1.0 52>Marks>=50, Grade point: 0.7 Marks<50, Grade point: 0.0 And the formula to calculate GPA is: GPA = sum(Each course grade point * credit of each course) / (Total credits attended) %3D
57>Marks>=55, Grade point: 1.3
55>Marks>=52, Grade point: 1.0
52>Marks>=50, Grade point: 0.7
Marks<50, Grade point: 0.0
And the formula to calculate GPA is:
GPA = sum(Each course grade point * credit of each course) / (Total
credits attended)
%3D
Sample Input:
Adam 83 95 67 72
[Explanation: gpa =
(3.3*3.0+4.0*3.0+2.3*3.0+2.7*3.0)/12.0 = 3.075 = 3.08]
John 40 55 81 76
Alice 65 96 92
STOP
Sample Output:
{'Adam': 3.08, 'John': 1.9, 'Alice': 3.43}
Transcribed Image Text:57>Marks>=55, Grade point: 1.3 55>Marks>=52, Grade point: 1.0 52>Marks>=50, Grade point: 0.7 Marks<50, Grade point: 0.0 And the formula to calculate GPA is: GPA = sum(Each course grade point * credit of each course) / (Total credits attended) %3D Sample Input: Adam 83 95 67 72 [Explanation: gpa = (3.3*3.0+4.0*3.0+2.3*3.0+2.7*3.0)/12.0 = 3.075 = 3.08] John 40 55 81 76 Alice 65 96 92 STOP Sample Output: {'Adam': 3.08, 'John': 1.9, 'Alice': 3.43}
Expert Solution
steps

Step by step

Solved in 2 steps with 1 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