Question: Part 3 : Average Steps Calculator ( 5 0 % ) A personal fitness tracker keeps track of the number of steps the wearer takes

Part 3: Average Steps Calculator (50%)
A personal fitness tracker keeps track of the number of steps the wearer takes each day. The online component of the product allows the user to download a file containing daily step data.
Attached is a file named steps.txt. It contains the number of steps a user took every day. The first entry is January 1 all the way through to December 31.(Presume 28 days in February).
Write a program to analyze the steps taken to show:
Average steps taken each month
Most steps taken each month
Your program should:
Use named constants for the number of days in each month
i.e.: JANUARY =31, FEBRUARY =28, etc.
Use a variable for each month - this should be a list
i.e.: jan_steps =[], feb_steps =[], etc
Remember you can initialize a list using []
Use a function named steps_read to generate the step list for each individual month
Your function should accept 2 values as arguments - the file variable and the number of days in the month
Use a for loop in the function that reads one line of steps at a time (readline method)
Function should return a single LIST of all the lines / steps for that particular month
(You will need to call this function 12 times!)
Use a separate function named stats_calc to calculate the average and max steps taken for a month
Your function should accept the list (generated from the above function) for a month's steps as an argument.
Hint: You can use sum, max, and len built-in list functions to calculate the monthly average and most steps taken for a day in a month.
Function should return 2 values: the average and max steps to your main program
HINT: Use the read position to your advantage. It always remembers the next line to be read.
BONUS!
BONUS #1: Worth up to 5 additional points
Determine the date (day of the respective month) the maximum steps were taken
Hint: indexes start at zero, not one.
BONUS #2: Worth up to 5 additional points
Concatenate your 12 lists to calculate: highest, lowest and average step totals all year
Do this using a separate function and return the proper values to your main or no bonus points will be given
Software requirements for ALL Python code parts:
Use comments at the top of your program to indicate your name, name of your program and a short description of what the program does
Store any values used in calculations as variables or named constants
All output should use F-Strings only
No calculations inside output statements
Comment the meaning of all variables and functions when they are created
All input requests should be user-friendly with correct grammar and spacing before the input area
Format all numerical output in appropriate formats (use integer or decimal with appropriate places)
Do not use global variables! This also means no variables outside of main()!
If you write a function, you must pass the required values into your function and use a return statement to return the appropriate value(s) back to the line of your program that called the function
If we have not yet learned a particular statement, you are not able to use it and will receive a zero for that entire part of the lab
Submit a valid python file named as requested. Do not submit output from the interactive shell.
steps.txt
1102
9236
10643
2376
6815
10394
3055
3750
4181
5452
10745
9896
255
9596
1254
2669
1267
1267
1327
10207
5731
8435
640
5624
1062
3946
3796
9381
5945
10612
1970
9035
1376
1919
2868
5847
685
10578
3477
3937
5994
6971
3011
4474
4344
8068
6564
2659
4064
1161
6830
5167
5686
5352
898
4316
7699
6406
6466
2802
1239
8162
398
9908
8251
8419
6245
8484
9012
6318
853
4031
868
8776
10453
1026
1984
8127
5274
6937
1960
9655
1279
9386
6697
6326
2509
7127
7802
8798
6564
7220
10650
3847
7485
10951
3883
9456
4671
2067
6871
1573
8746
7473
4713
1215
8486
6652
4054
10304
5291
2680
9108
6446
1581
7607
2032
7630
1106
3702
986
8602
556
2209
3055
886
5813
6513
3154
1534
6271
611
4001
6522
3819
8396
2364
9660
5937
2506
9002
8586
8805
552
5802
7825
5610
8169
602
5638
2072
3536
5885
9334
6393
9318
6057
5812
5647
4654
1880
634
3084
9606
2287
3032
4030
5627
1314
8489
1601
8559
2083
5520
1829
2890
4533
3225
7405
3985
5521
1127
7109
8083
3615
1475
2896
10523
7108
797
8443
169
8755
5761
9862
9032
1659
10944
6878
1253
4690
9934
8820
41
9367
1898
3554
10650
3136
3574
9682
3950
691
8247
6677
10381
8879
8660
6431
6030
365
10357
10526
9245
5291
4651
5741
800
540
6074
68
8714
5095
4578
1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!