PLEASE USE PYTHON PLEASE (give the same output as the instruction given) Program Specifications Write a program to calculate a course grade given points for homework, quizzes, Survey, and Pratice question 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 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, Survey, and Practice question score. Calculate each category's average using maximum points for homework (800), quizzes (400), Survey(150), and Practice question (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% Survey: 80.0% Practice question: 92.5% Ex: If the input is: TL 600 300 120 180 The output is: Error: student status must be UG, G or DL Step 2 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% Survey: 100.00% Practice question: 100.0% Step 3 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 G DL Homework 20% 15% 5% Quizzes 20% 5% 5% Survey 30% 35% 40% Practice question 30% 45% 50% Ex: If the input is: G 800.0 400.0 100.0 100.0 The output is: Homework: 100.0% Quizzes: 100.0% Survey: 66.7% Practice question: 50.0% G average: 65.8% Step 4 . Identify the course letter grade based on the course average using the table below. Output the course letter grade. Submit for grading to confirm all tests pass. Average Grade at least 90.0 A at least 80.0 and less than 90.0 B at least 70.0 and less than 80.0 C at least 60.0 and less than 70.0 D less than 60.0 F Ex: If the input is: DL 600.0 300.0 120.0 150.0 The output is: Homework: 75.0% Quizzes: 75.0% Survey: 80.0% Practice question: 75.0% DL average: 77.0% Course grade: C

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
100%

PLEASE USE PYTHON PLEASE (give the same output as the instruction given)

Program Specifications Write a program to calculate a course grade given points for homework, quizzes, Survey, and Pratice question 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 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, Survey, and Practice question score. Calculate each category's average using maximum points for homework (800), quizzes (400), Survey(150), and Practice question (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% Survey: 80.0% Practice question: 92.5%

Ex: If the input is:

TL 600 300 120 180

The output is:

Error: student status must be UG, G or DL


Step 2 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% Survey: 100.00% Practice question: 100.0%

Step 3 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 G DL
Homework 20% 15% 5%
Quizzes 20% 5% 5%
Survey 30% 35% 40%
Practice question 30% 45% 50%


Ex: If the input is:

G 800.0 400.0 100.0 100.0

The output is:

Homework: 100.0% Quizzes: 100.0% Survey: 66.7% Practice question: 50.0% G average: 65.8%


Step 4 . Identify the course letter grade based on the course average using the table below. Output the course letter grade. Submit for grading to confirm all tests pass.

Average Grade
at least 90.0 A
at least 80.0 and less than 90.0 B
at least 70.0 and less than 80.0 C
at least 60.0 and less than 70.0 D
less than 60.0 F


Ex: If the input is:

DL 600.0 300.0 120.0 150.0

The output is:

Homework: 75.0% Quizzes: 75.0% Survey: 80.0% Practice question: 75.0% DL average: 77.0% Course grade: C

Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Function Arguments
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning