Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem: Set Tracking ( sets . py ) Most workout plans include some form of strength training. During a strength training workout, participants will track
Problem: Set Tracking setspy
Most workout plans include some form of strength training. During a strength training workout,
participants will track the number of sets they complete and the number of repetitions per set
for that exercise.
In this program, we want to assist the user by tracking the average number of repetitions across
their sets for each workout they want to enter data for.
Program Specification
We will start by asking the user how many workouts they want to enter data for. Then, for each
workout, ask the user how many sets were completed. Then, for each set, ask the user how
many repetitions were completed.
Your program must use nested for loops with reasonable ranges for this input process.
Your program may not use while loops.
When all of the information is entered for the workout, tell the user the average number of
repetitions for that workout.
Your program may not use a list, list functions, or functions that operate on iterables.
Your program may not define functions.
Your program may not include material outside of modules and
Input Specification
NOTE: Input specifications guarantee that whoever uses your program, including the graders,
will adhere to these specifications. This means that you do not need to check for them.
The number of workouts will be a positive integer.
The number of sets will be a positive integer.
The number of repetitions will be a positive integer.
Output Specification
Remember to match the phrases provided below and in the sample runs.
Begin your program with the following prompt:
How many workouts do you have data for?
Then, for each workout, prompt the user with:
How many sets were completed in workout #X
Then, for each set, prompt the user with:
How many repetitions in set #Y
At the end of each workout output the average number of repetitions for that workout to three
decimal places.
Workout #X: The average number of repetitions was ZZZZ
Output note: Use Pythons round function to control your outputs precision. Remember that
when using this function, you may have fewer decimal places in your result. This is fine. You may
not have more than decimal places in your output.
Output Samples
Below are some sample outputs of running the program. Note that these samples are NOT a
comprehensive test. You should test your program with different data than is shown here based
on the specifications given above. In the sample run below, for clarity and ease of reading, the
user input is given in italics while the program output is in bold. Note: When you actually run
your program no bold or italics should appear at all. These are simply used in this description for
claritys sake.
Sample Run #
How many workouts do you have data for?
How many sets were completed in workout #
How many repetitions in set #
How many repetitions in set #
Workout #: The average number of repetitions was
How many sets were completed in workout #
How many repetitions in set #
How many repetitions in set #
How many repetitions in set #
Workout #: The average number of repetitions was
How many sets were completed in workout #
How many repetitions in set #
How many repetitions in set #
How many repetitions in set #
Workout #: The average number of repetitions was
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started