Code review: mostly work on readability

* Moved constants to beginning of file and named them
* It was assumed filename ends with .txt. Changed to arbitrary .ext but it is still kind of hackish
* Current time was not provided, using local datetime.now() instead
* Refactored ratio, now called generate_statistics, to only return the percentage and created new function to print results