CECS 100
LAB ASSIGNMENT 5
Assigned date: 9/30
Due date: Monday 10/7
30 points
Problem 1 [15 points]
Create a Raptor flowchart to represent the logic of a program that asks the user to enter four test score. The program displays the grade for each test score and the average of all four test scores. Use a loop to input four test scores. Use the grading table below to assign a grade to the test score.
Test Score Average | Letter Grade |
90-100 | A |
80-89 | B |
70-79 | C |
60-69 | D |
Below 60 | F |
Input
Enter a test score: 55
Enter a test score: 96
Enter a test score: 73
Enter a test score: 82
Output
Test score: 55
Letter grade : F
Test score: 96
Letter grade : A
Test score: 73
Letter grade : C
Test score: 82
Letter grade : B
Test score average = 76.5000
Problem 2 [15 points]
Redo problem 2 using Python.
Criteria | Approx. % of Grade | Excellent (100%) | Adequate (80%) | Poor (60%) | Not Met (0%) |
---|---|---|---|---|---|
Program Specification /Correctioness | 50%(10 points) | No errors, program always works correctly and meets the specification(s). | Minor details of the program specification are violated, program functions incorrectly for some inputs. | Significant details of the specification are violated, program often exhibits incorrect behavior. | Program only functions correctly in very limited cases or not at all. |
Readability | 20% (4 points) | No errors, code is clean, understandable, and well-organized. | Minor issues with consistent indentation, use of whitespace, variable naming, or general organization. | At least one major issue with indentation, whitespace, variable names, or organization. | Major problems with at three or four of the readability subcategories. |
Documentation | 10% (2 points) | No errors, code is well-commented. | One or two places that could benefit from comments are missing them or the code is overly commented. | File header missing, complicated lines or sections of code uncommented or lacking meaningful comments. | No file header or comments present. |
Code Efficiency | 15% (3 points) | No errors, code uses the best approach in every case. | No errors, code uses the working approach in every case. | Code uses poorly-chosen approaches in at least one place. | Many things in the code could have been accomplished in an easier, faster, or otherwise better fashion. |
Assignment Specifications | 5% (1 point) | No errors | N/A | Minor details of the assignment specification are violated, such as files named incorrectly or extra instructions slightly misunderstood. | Significant details of the specification are violated, such as extra instructions ignored or entirely misunderstood. |