Write a Python program to estimate the grading costs for an online asynchronous course. A simpler version of the course you're taking now.
Each student submits exercises throughout the course. Graders use rubrics to evaluate each submission. Rubric items are things like "Used at least two functions" and "Validated exercise counts."
There are three types of exercises: basic, standard, and advanced. Here are the number of rubric items per exercise type:
- Basic: 5
- Standard: 10
- Advanced: 16
For a new grader, it takes an average of 12.6 seconds to grade one rubric item. So it would take 10 * 12.6 = 126 seconds to grade one standard submission.
An experienced grader takes about 8.4 seconds per rubric item. So an experienced grader would take 5 * 8.4 seconds to grade a basic exercise.
The total grading time for the course depends on the number of students, the number of each type of exercise each student submits, and the grading time for each exercise type.
The hourly rate for a new grader is $25. It's $37 for an experienced grader.
Here's some I/O for a simple run, showing the input users give:
- Course grading
- ====== =======
- Course name? YUM 100 Candy Appreciation
- Basic exercises? 1
- Standard exercises? 1
- Advanced exercises? 1
- Students? 1
- Is this a new grader? n
- -----------------------
- Grading costs for YUM 100 Candy Appreciation
- Total rubric items per student: 31
- Total rubric items for the course: 31
- Grading time per rubric item: 8.4
- Total grading time (hours): 1
- Hourly grader rate: 37
- Total grader pay: 37
Show error messages if input is invalid.
- Course name: required
- Exercise counts: integers from 0 to 30
- Students: integer from 1 to 200
- New grader: y or n, either upper or lowercase, extra spaces allowed
Another I/O sample, showing validation:
- Course grading
- ====== =======
- Course name?
- Sorry, you must enter a value.
- Course name? GME 101 Introduction to game programming
- Basic exercises? some
- Sorry, you must enter a whole number.
- Basic exercises? -2
- Sorry, please enter a number between 0 and 30.
- Basic exercises? 333
- Sorry, please enter a number between 0 and 30.
- Basic exercises? 8
- Standard exercises? 12
- Advanced exercises? 8
- Students? some
- Sorry, you must enter a whole number.
- Students? -122
- Sorry, please enter a number between 1 and 200.
- Students? 30
- Is this a new grader? maybe
- Sorry, you must enter Y or N.
- Is this a new grader? n
- -----------------------
- Grading costs for GME 101 Introduction to game programming
- Total rubric items per student: 288
- Total rubric items for the course: 8640
- Grading time per rubric item: 8.4
- Total grading time (hours): 21
- Hourly grader rate: 37
Another example:
- Course grading
- ====== =======
- Course name? GT 100 Goat Photography
- Basic exercises? 10
- Standard exercises? 16
- Advanced exercises? 8
- Students? 50
- Is this a new grader? y
- -----------------------
- Grading costs for GT 100 Goat Photography
- Total rubric items per student: 338
- Total rubric items for the course: 16900
- Grading time per rubric item: 12.6
- Total grading time (hours): 60
- Hourly grader rate: 25
- Total grader pay: 1500
Other things:
- Use at least two functions (I used three in my solution).
- Round up hours. So if 4.2 grading hours are needed, round up to 5.
Ask your friendly neighborhood AI how to round up, with a prompt like: "python round up" or something. It should tell you about math and ceil.
The usual coding standards apply. Upload here, not to Moodle.