Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am writing a Python program to serve as a fitness tracker. I would love some input as to how you would code this. I've

I am writing a Python program to serve as a fitness tracker. I would love some input as to how you would code this. I've included what I want this program to accomplish, what I will keep track of, and below all of that I have posted the assignment guidelines. Any suggestions on how to make this better/ more efficient would be welcome! I'm thinking of making a weekly tracker that takes input per day, and outputs at the end of the week the amount of exercise and if goals were met. Could be a monthly accumulation, but weekly would be easier.

Fitness Tracker: To determine if fitness goals were met.

Set goal (minimum): 4 yoga classes per week. Per day: 20 min of exercise (cardio, weights, body weight resistance), 10 min of meditation/stretching

Input daily, but you can input it all at the end of the week if you want.

Maybe I should prompt the user to enter the date and keep track in a range of 7 days and start there.

Output: Weekly amount: Amount of exercise (yoga classes taken, Min of exercise per type, min of stretch/meditation). Determine if goals were met. Ouput time should be in hours.

Below are the assignment requirements. A test plan is also required.

  • Full pseudocode should be included in the comments.
  • It must have at least one input and at least one output.
  • It must validate the user input. This means the user is not allowed to just enter any value. You must check the value, and ask the user to enter it again, and repeat this loop until the user enters a valid value.
  • Your program must use at least two loops in meaningful ways. The loops you use for input validation count for at most one of the two required loops. If you use loops to validate two separate inputs, that does not count as two loops for satisfying this lab requirement.
  • It should be organized into separate modules (one module for input, one module for output, and one module for each separate calculation or action that the program is to perform [that is, each module should be "cohesive" and should only do one thing]).
  • Use parameters and arguments to pass values into your modules (don't use global variables).
  • The Python code should run correctly, and the logic should match your pseudocode.

The test plan document Lab4-TestPlan should meet all of the following requirements:

  • Follow the format given in the example test plans (one below, and one on the Testingpage). You can download and copy the test plan document below and use it as a template: replace the content of each section with your own content.
  • Write the test plan as if for someone who cannot see your source code (utilize black-box testing). They can only run the program, provide inputs, and observe outputs.
  • For each test case, include at least the following fields: Summary, Test Procedure, Test Data, Expected Result. Feel free to add more fields if you want to. (See Test Case for additional fields.)
  • Include test cases for all important categories of input (valid, invalid, boundary, etc.). If your program passes every test case in your test plan, you should be confident that it functions correctly.
    • Be sure to run your program against the test plan to determine its correctness, and fix any bugs found.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions