My library > CS 109: Python Programming for Engineers with MatLab home > 21.6: LAB*: Program: Grade calculator E zyBooks catalog ? Help/FAQ 21.6 LAB*: Program: Grade calculator Program Specifications Write a program to calculate a course grade given points for homework, quizzes, midterm exam, and final exam. Grades are calculated differently for undergrads, grads and distance learners. Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress. Step 1 (2 pts). Read from input student status (str). If input is not one of "UG" (undergrad), "G" (grad), or "DL' (distance learner), print an error message and exit the program. Otherwise read from input floats for homework points, quiz points, midterm exam score, and final exam score. Calculate each category's average using maximum points for homework (800), quizzes (400), midterm exam (150), and final exam (200). Output category averages as a percentage using print(f"Homework: {homework:2.1f}%"). Submit for grading to confirm two tests pass. Ex: If the input is: UG 600.0 300.0 120.0 185.0 The output is: Homework: 75.0% Quizzes: 75.0% Midterm: 80.0% Final Exam: 92.5% Ex: If the input is: TL 600 300 120 180 Rain coming

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

21.6 LAB PROGRAM GRADE CALCULATOR 

in python please

Inbox X
My Gr X
zy Sectio X
Immig X How I X T Debur X T Do Ille X
Ca MIGR X E Melvir x cG Used X
bartle X b Verify X
21.6 L X
https://learn.zybooks.com/zybook/UICCS109KoehlerSpring2022/chapter/21/section/6?content_resource_id%361248307
E zyBookS My. library > CS 109: Python Programming for Engineers with MatLab home > 21.6: LAB*: Program: Grade calculator
E zyBooks catalog
Help/FAQ
Step 2 (2 pts). Set any average to 100% if average is above 100%. Submit for grading to confirm three tests pass.
Ex: If the input is:
UG
700.0
300.0
200.0
205.0
The output is:
Homework: 87.5%
Quizzes: 75.0%
Midterm: 100.0%
Final Exam: 100.0%
Step 3 (2 pts). Calculate the course average based on student status using the table below. Output the course average. Submit for grading
to confirm five tests pass.
Category
UG
DL
Homework 20% 15% 5%
Quizzes
20% 5%
5%
Midterm
30% 35% 40%
Final Exam 30% 45% 50%
Ex: If the input is:
100.0
800.0
400.0 100.0
Rain coming
Transcribed Image Text:Inbox X My Gr X zy Sectio X Immig X How I X T Debur X T Do Ille X Ca MIGR X E Melvir x cG Used X bartle X b Verify X 21.6 L X https://learn.zybooks.com/zybook/UICCS109KoehlerSpring2022/chapter/21/section/6?content_resource_id%361248307 E zyBookS My. library > CS 109: Python Programming for Engineers with MatLab home > 21.6: LAB*: Program: Grade calculator E zyBooks catalog Help/FAQ Step 2 (2 pts). Set any average to 100% if average is above 100%. Submit for grading to confirm three tests pass. Ex: If the input is: UG 700.0 300.0 200.0 205.0 The output is: Homework: 87.5% Quizzes: 75.0% Midterm: 100.0% Final Exam: 100.0% Step 3 (2 pts). Calculate the course average based on student status using the table below. Output the course average. Submit for grading to confirm five tests pass. Category UG DL Homework 20% 15% 5% Quizzes 20% 5% 5% Midterm 30% 35% 40% Final Exam 30% 45% 50% Ex: If the input is: 100.0 800.0 400.0 100.0 Rain coming
92022/chapter/21/section/6?content_resource_id%3D61248307
ks My library > CS 109: Python Programming for Engineers with MatLab home > 21.6: LAB*: Program: Grade calculator
E zyBooks catalog
?
Help/FAQ 8
21.6 LAB*: Program: Grade calculator
Program Specifications Write a program to calculate a course grade given points for homework, quizzes, midterm exam, and final exam.
Grades are calculated differently for undergrads, grads and distance learners.
Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only
a portion of tests pass after each step but confirm progress.
Step 1 (2 pts). Read from input student status (str). If input is not one of "UG" (undergrad), "G" (grad), or "DL" (distance learner), print an error
message and exit the program. Otherwise read from input floats for homework points, quiz points, midterm exam score, and final exam
score. Calculate each category's average using maximum points for homework (800), quizzes (400), midterm exam (150), and final exam
(200). Output category averages as a percentage using print(f"Homework: {homework:2.1f}%"). Submit for grading to confirm two
tests pass.
Ex: If the input is:
UG
600.0
300.0
120.0
185.0
The output is:
Homework: 75.0%
Quizzes: 75.0%
Midterm: 80.0%
Final Exam: 92.5%
Ex: If the input is:
TL
600 300 120 180
6.
Rain coming
2/
Transcribed Image Text:92022/chapter/21/section/6?content_resource_id%3D61248307 ks My library > CS 109: Python Programming for Engineers with MatLab home > 21.6: LAB*: Program: Grade calculator E zyBooks catalog ? Help/FAQ 8 21.6 LAB*: Program: Grade calculator Program Specifications Write a program to calculate a course grade given points for homework, quizzes, midterm exam, and final exam. Grades are calculated differently for undergrads, grads and distance learners. Note: this program is designed for incremental development. Complete each step and submit for grading before starting the next step. Only a portion of tests pass after each step but confirm progress. Step 1 (2 pts). Read from input student status (str). If input is not one of "UG" (undergrad), "G" (grad), or "DL" (distance learner), print an error message and exit the program. Otherwise read from input floats for homework points, quiz points, midterm exam score, and final exam score. Calculate each category's average using maximum points for homework (800), quizzes (400), midterm exam (150), and final exam (200). Output category averages as a percentage using print(f"Homework: {homework:2.1f}%"). Submit for grading to confirm two tests pass. Ex: If the input is: UG 600.0 300.0 120.0 185.0 The output is: Homework: 75.0% Quizzes: 75.0% Midterm: 80.0% Final Exam: 92.5% Ex: If the input is: TL 600 300 120 180 6. Rain coming 2/
Expert Solution
Step 1

Solution: 

 

The python code for above question is given below.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education