Functions You Must Implement: main readSteps getGoalSummar…
Functions You Must Implement: main readSteps getGoalSummary matchingSteps writeAnalysis You are to write a program which analyzes one month’s (30 days’) worth of step data recorded via a user’s pedometer. The step data are stored in as file, stepData.txt, with one day’s step count stored on each line. The data for this file are listed at the bottom of these instructions, and you should copy them into a file called stepData.txt, stored in your PyCharm project folder. When complete Copy and Paste the contents of your PY file into the text box main() function instructions Prompt the user to enter a daily step goal. Call the readSteps() method, passing in the name of the file to be read. Using the data returned from readSteps(), call: The getGoalSummary() method (this will also require passing the user’s daily step goal). The matchingSteps() method. The writeAnalysis method (this will also require passing in the results from getGoalSummary() and matchingSteps(), and the user’s daily step goal). Print “See analysis.txt for results analysis.” to the screen. Sample Input Enter a step goal: 10000 Sample Output (contents of analysis.txt): Daily step goal: 10000 Days under step goal: 16 Days at step goal: 2 Days over step goal: 12 Average steps: 9512.07 Matching steps: 9000 Matching steps: 8080 Matching steps: 7485 stepData.txt contents 10522 8828 6062 6544 14694 10087 9000 9000 1000 9897 9730 6168 12834 10000 12396 13284 9931 1000 15257 8080 8080 11450 10364 10000 7485 7485 12759 9192 10237 13996
Read Details