Question: Problem 1 In this problem, you are given a completed program that has errors. You need to fix the errors. This flawed program is supposed
Problem 1
In this problem, you are given a completed program that has errors. You need to fix the errors.
This flawed program is supposed to ask the user their weight. Then the program will output details on how much the user will weigh each month on a diet where they eat 500 calories less than what they need for weight maintenance (approximately 4 pounds a month).
- The instructor has provided a file called Lab03P1-FixTheErrors.py. Download that file and rename it Lab03P1.py.
- Copy that file into your PyCharm project.
- Change the program header to include your name and the date.
- Run the program AS IS and see if you can determine what is wrong with the program. Note: You do NOT need a screen shot of the error for this problem.
- Correct all the errors. You should eventually be able to run the program with no errors that accurately produces a table like the sample output.
Sample Output:
What is your starting weight? 225
At the end of month 1 your weight will be 221 lbs.
At the end of month 2 your weight will be 217 lbs.
At the end of month 3 your weight will be 213 lbs.
At the end of month 4 your weight will be 209 lbs.
At the end of month 5 your weight will be 205 lbs.
At the end of month 6 your weight will be 201 lbs.
Lab03P1-FixTheErrors.py
# # Student Name # Date # Weight Loss Estimator # # Get the user's starting weight. weight = input(int('What is your starting weight? ')) # Display the weight loss table. for month in range(-6, 6): weight = 4 print('At the end of month', weight, 'your weight will be', month, 'lbs.') Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
