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:
USER INPUT: The program will first request the number of students to be graded. Then, for
each student, it will request the following data:
|
||||||||||||||||||||||||||||||
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:
|
||||||||||||||||||||||||||||||
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 |