[SOLVED] CS Assignment Description

$25

File Name: CS_Assignment_Description.zip
File Size: 235.5 KB

5/5 - (1 vote)

Assignment Description
Your Personalized Workout Program
Your task is to create a program for your local gym to assess their members needs and give them exercises based on their situations and goals. Your program decides the best exercise for each member and gives them detailed instructions to run the exercise.

Copyright By Assignmentchef assignmentchef

First task
These are workouts categories based on members sex and age and also based on their goals:

Gym workout for fat loss

Gym workout for stretch and relax

Gym workout for high-intensity exercises

Gym workout for strong legs

Gym workout for strong ABS

Gym workout for strong shoulders and arms

Gym workout for a male younger than 18 years old

Gym workout for a female younger than 18 years old

Gym workout for a male at least 18 years old

Gym workout for a female at least 18 years old

Each one of these categories has a name (e.g. Gym workout for fat loss) and a list of exercises, repetitions/minutes, and sets for each exercise. The following is a set of exercises for the workout category Gym workout for fat loss:

Gym workout for fat loss

Plate thrusters (15 reps x 3 sets)
Mountain climbers (20 reps x 3 sets)
Box jumps (10 reps x 3 sets)
Lounges (10 reps x 3 sets)
Renegade rows (10 reps x 3 sets)
Press ups (15 reps x 3 sets)
Treadmill (15 mins x 2 sets)
Supermans (15 reps x 3 sets)
Crunches (20 reps x 3 sets)

These ten categories of workouts and their detailed exercises are in readme.md file. Please make your categories according to them, and avoid making typo and punctuation mistakes.

Second task
In this part of your code, you are asking members to answer some questions about themselves. The questions you are asking are based on their name, sex, age, goals for exercising, and how many days per week they can exercise. These questions should help the program decide what sort of exercises suit the member better. Here is the set of questions to ask:

Please enter your name:

Please enter your age:

Please enter your biological sex (female/male):

What do you want to get out of your training?
1. Your goal is losing weight
2. Your goal is to staying calm and relax
3. Your goal is increasing your heart rate
4. Your goal is having stronger legs
5. Your goal is having stronger ABS
6. Your goal is having stronger shoulders and arms
Choose a number between 1 to 6:

How many days per week you can train:

Third task
The program should decide what exercise suits each member based on their input. Here you will need to loop through the workout categories based on members age/sex or goals. Depending on how many days per week they want to train, choose one workout from the list of goals (workout 1 to 6) and one workout from the list of age/sex (workout 7 to 10) alternatively, and repeat it for the rest of the week. The first workout is always from category [1-6] and the second workout is from categories [7-10].

For example, lets say our members name is Lucas, a 19 years old male whose goal is to lose weight and can train 2 days a week. Your program should give them two sets of workouts, one from the category based on their goal, and another from the category based on their age/sex:

Day 1: Gym workout for fat loss

Day 2: Gym workout for a male at least 18 years old

If he can only train one day a week, the program only chooses from the goal category for him. For example:

Day 1: Gym workout for fat loss

If he can train three days a week, the program will repeat between the two categories, starting from the goal category. For example:

Day 1: Gym workout for fat loss

Day 2: Gym workout for a male at least 18 years old

Day 3: Gym workout for fat loss

The format of the output shown to the user is as follows. This is generated for Lucas, who is 19 years old male and can train 1 day a week:

Hello Lucas! Here is your training:

Gym workout for fat loss

Plate thrusters (15 reps x 3 sets)
Mountain climbers (20 reps x 3 sets)
Box jumps (10 reps x 3 sets)
Lounges (10 reps x 3 sets)
Renegade rows (10 reps x 3 sets)
Press ups (15 reps x 3 sets)
Treadmill (15 mins x 2 sets)
Supermans (15 reps x 3 sets)
Crunches (20 reps x 3 sets)

Fourth task
Your last task is to adjust the intensity of the workouts based on members age. Your program has to check members age and lower the intensity of the workouts for older people by lowering the number of reps/mins for each exercise. The reps/mins are lowered based on the following rules:

For ages above 60 years old, the program lowers the reps/mins by 1% for every year above 60 years old.

For ages above 65 years old, the program lowers the reps/mins by 5% plus 2% for every year above 65 years old.

For ages above 75 years old, the program lowers the reps/mins by 25% plus 3% for every year above 75 years old.

For ages above 80 years old, the program lowers the reps/mins by 40% plus 4% for every year above 80 years old, up to a maximum of 80%.

The number of reps/mins should be rounded up to the nearest whole integer, and it cannot be less than 1.

Hint: Use math.ceil() to round numbers to the nearest whole integers.

End of Program
Always print Bye . at the end of the program, where is the name entered.

Program Executions
Your program start working by running this command:

$ python3 gym.py
Here is an example of executing your program when its working without an error, where # denotes user input:

$ python3 gym.py
Please enter your name: #enter your age: #19

Please enter your biological sex (female/male): #male

What do you want to get out of your training?
1. Your goal is losing weight
2. Your goal is to staying calm and relax
3. Your goal is increasing your heart rate
4. Your goal is having stronger legs
5. Your goal is having stronger ABS
6. Your goal is having stronger shoulders and arms
Choose a number between 1 to 6: #1

How many days per week you can train: #2

Hello Lucas! Here is your training:

Gym workout for fat loss

Plate thrusters (15 reps x 3 sets)
Mountain climbers (20 reps x 3 sets)
Box jumps (10 reps x 3 sets)
Lounges (10 reps x 3 sets)
Renegade rows (10 reps x 3 sets)
Press ups (15 reps x 3 sets)
Treadmill (15 mins x 2 sets)
Supermans (15 reps x 3 sets)
Crunches (20 reps x 3 sets)

Gym workout for a male at least 18 years old

Standing biceps curls (20 reps x 3 sets)
Seated incline curls (18 reps x 3 sets)
Seated dumbbell presses (12 reps x 3 sets)
Leg presses (15 reps x 3 sets)
Bench presses (10 reps x 4 sets)
Tricep kickbacks (15 reps x 3 sets)
Hip thrusts (12 reps x 3 sets)
Seated rows (10 reps x 4 sets)

Bye Lucas.
Expand (47 lines)
Error handling
Your program should be able to handle input errors from the user. If there is an error, the program will continually ask for input until it is valid.

The program should only accept alphabetical characters from [a-z][A-Z] and spaces, when the user enters their name. Here is an example of the correct format:

Please enter your name: #here is an example of an error:

Please enter your name: #LuC1!
Error: Only accept alphabetical characters and spaces for name
The age is a number between [0-110]. An example of an error:

Please enter your age: #800
Error: The age is a number between 0 to 110
Sex is only male or female (case sensitive). An example of an error case:

Please enter your biological sex (female/male): #M
Error: Please enter valid input
In the above example goal is an option between 1 to 6. An example of an error case:

What do you want to get out of your training?
1. Your goal is losing weight
2. Your goal is to staying calm and relax
3. Your goal is increasing your heart rate
4. Your goal is having stronger legs
5. Your goal is having stronger ABS
6. Your goal is having stronger shoulders and arms
Choose a number between 1 to 6: #0
Error It can only be a number between 1 to 6

And the last input is the number of training days, which can be a number between 1 to 7. An example of an error for this field:

How many days per week you can train: #8
Error: It can only be a number between 1 to 7
Here is an example of executing your program when there is an input error from the user:

$ python3 gym.py
Please enter your name: #enter your age: #19

Please enter your biological sex (female/male): #male

What do you want to get out of your training?
1. Your goal is losing weight
2. Your goal is to staying calm and relax
3. Your goal is increasing your heart rate
4. Your goal is having stronger legs
5. Your goal is having stronger ABS
6. Your goal is having stronger shoulders and arms
Choose a number between 1 to 6: #60
Error It can only be a number between 1 to 6

What do you want to get out of your training?
1. Your goal is losing weight
2. Your goal is to staying calm and relax
3. Your goal is increasing your heart rate
4. Your goal is having stronger legs
5. Your goal is having stronger ABS
6. Your goal is having stronger shoulders and arms
Choose a number between 1 to 6: #1

How many days per week you can train: 2

Hello Lucas! Here is your training:

Gym workout for fat loss

Plate thrusters (15 reps x 3 sets)
Mountain climbers (20 reps x 3 sets)
Box jumps (10 reps x 3 sets)
Lounges (10 reps x 3 sets)
Renegade rows (10 reps x 3 sets)
Press ups (15 reps x 3 sets)
Treadmill (10 mins x 3 sets)
Supermans (10 reps x 3 sets)
Crunches (10 reps x 3 sets)

Gym workout for a male at least 18 years old

Standing biceps curls (20 reps x 3 sets)
Seated incline curls (18 reps x 3 sets)
Seated dumbbell presses (12 reps x 3 sets)
Leg presses (15 reps x 3 sets)
Bench presses (10 reps x 4 sets)
Tricep kickbacks (15 reps x 3 sets)
Hip thrusts (12 reps x 3 sets)
Seated rows (10 reps x 4 sets)

Bye Lucas.
Expand (57 lines)

Hints and Extra Information
You should always print an empty line directly before asking the user for input.

Inputs are case-sensitive. For example, female is valid, but Female is invalid.

CS: assignmentchef QQ: 1823890830 Email: [email protected]

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS Assignment Description
$25