Python Program Four

Using the techniques presented in Python Tutorial Four , you are to design, code and test a simple Python program using the variable controlled for/next loop statement to control the repetitive structure. As was done in the previous homework assignment:

As before, each test is worth 20 points. The program will determine whether or not the student passes, based on a score greater than 65% of the total. This new program will be designed to grade a varying number of students, not just three students as in the previous homework assignment.

USER INPUT: The program will first request the number of students to be graded. Then, for each student, it will request the following data:
  • Student's  first name
  • the scores for five exams each having 20 questions
PROGRAM PROCESSING: As before, after the program will calculate the total correct questions and determine whether the student will receive a P or NP grade.
Unlike the previous two homework assignments in which you simply printed each data item on a separate line running down the page, you will list the student's name, each test score, total points and the P/NP assigned in a tabular format (Rows and Columns). You will use Python's print format statement as shown in the example to create your output in Rows and Columns
At the end of the report, after all on the students have been listed, your program will print summary information including the number students in the class and the average total points obtained. This requires your program to  maintain a running total (accumulator) of the total points each student has obtained.
When you are through coding your program, test it using the following scenario:
These students earned the following scores on their five Tests:
  Test 1 Test 2 Test 3 Test 4 Test 5
  18 18 17 19 20
  16 16 17 1 0
  17 15 17 18 17
  15 12 13 15 10
You will need to take a Screen Shot of your run for submission with your .py file. Be sure to check your program's accuracy by working the test data out by hand. Also, you can compare the layout of your report to the tutorial report to make sure you are following the techniques introduced in the tutorial. Look for and correct misspelling and inconsistent capitalization in titles and labels.
Submit your .py file and .rtf (or .doc) screen shot file as attachments in an email sent to me
Use "Programming Assignment 4" for the Subject line and remember to identify yourself by name and class in the email body.
Return to Assignment Index