CIS 111 Creating reports

Objective

  • Create reports using Python

Creating a report to the screen

Creating reports is pretty easy. The pseudocode below is an example of how to create a report that is sent directly to the display.

print report headers open the data file for each record in the data file process the record print record details to report close data file print report footers

Creating a report as a file

Creating reports as a file is also pretty easy. The pseudocode below is an example of how to create a report that is sent directly to a file.

open report file output report headers to report file open the data file for each record in the data file process the record output record details to report file close data file output report footers to report file close report file