Functions that return the output formats should return reformatted text instead of printing directly. This will allow us to test those functions with different inputs and verify that the outputs match our expectations. This will also give us flexibility to write each function's output to multiple locations. If functions find errors in the input data, they should raise exceptions (ValueError, etc.) so our tests can cover some garbage-in scenarios.
Functions that return the output formats should return reformatted text instead of printing directly. This will allow us to test those functions with different inputs and verify that the outputs match our expectations. This will also give us flexibility to write each function's output to multiple locations. If functions find errors in the input data, they should raise exceptions (ValueError, etc.) so our tests can cover some garbage-in scenarios.