Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MIS 304 (python) Homework 4: Grade Calculator ***PYTHON*** The point of this homework is NOT to get the calculations right. The focus of this homework

MIS 304 (python) Homework 4: Grade Calculator

***PYTHON***

The point of this homework is NOT to get the calculations right. The focus of this homework is the STRUCTURE of the code. Failure to design your program correctly will result in deductions up to 75%.

Create an application to determine a students grade in MIS 304.

  • User will enter grades for each of the 6 grades for MIS 304 (see table below). All must be numbers between 0 and 100 (inclusive). Decimals are okay. You realize this will be similar code written 6 times, so you should create a method to determine if the user entered grades in the correct range (0-100 inclusive). This method will need to be called six times (once for each of the six grades)
  • Create a second method to calculate the course grade using the following weights. The method will take each of the 6 grades as inputs and return the final numeric average. This method should have SIX parameters and be called only once. You should not have any addition or multiplication in your main method. This method may not return a string it MUST return a float that represents the numeric average.
  • You MUST use global constants for the weights for each grade. Each grade gets its own constant only defining a constant for 20% and a constant for 10% would defeat the purpose of the constants. We have constants to make updating easier. I shouldnt have to re-write the program if I decide to re-distribute the weights of the various assignments.

Assignment / Weight

Exm 1 20%

Exm 2 20%

Exm 3 20%

Homework 20%

Language QR 10%

Final Project 10%

Total 100%

  • Use a method to determine the final letter grade based on the following cutoffs. This method should have a parameter for the numeric average and return ONLY a single letter. If this method returns multiple Your grade is statements, you are violating the DRY principle (Dont Repeat Yourself) and you will be penalized

Final Average / Final Letter Grade

>=89.50 A

>=79.50 B

>=69.50 C

>=59.50 D

59.50>

IMPORTANT NOTE: MIS 304 is really graded using the +/- system (see syllabus for more details). I just didnt want you to have to write an IF statement with 12 branches!!

  • Display the students final numeric grade. The grade should display with 2 decimal places. Do NOT display this as a percentage.
  • Display the students final letter grade.
  • All other programming standards should be followed. Use good variable names to help the humans read your code, too. Also, include comments at the beginning of each function to explain its purpose.
  • If your program contains runtime or syntax errors under any scenario, you will receive a 40 point penalty.

Function Hierarchy

main()

/ | \

get_grade() calc_average() calc_letter()

get_grade takes the assignment name as an input and returns a grade stored as a float. This function will be called 6 times (once for each grade)

calc_average takes the six grades as parameters and returns the average stored as a float. This function will be called only once

calc_letter takes the numeric average computed by calc_average and returns the letter grade as a string. This function will be called only once

IMPORTANT:In addition to your python script, you should also submit a file containing all the screenshots of testing scenarios. Here is a detailed guide of how to do it:HW4 Scenarios Screenshots to Submit.docx

Sample Output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions