]> Nutra Git (v2) - nutratech/cli.git/commitdiff
add average 1RM to printout
authorShane Jaroch <chown_tee@proton.me>
Mon, 11 Dec 2023 21:38:53 +0000 (16:38 -0500)
committerShane Jaroch <chown_tee@proton.me>
Mon, 11 Dec 2023 21:38:53 +0000 (16:38 -0500)
ntclient/argparser/funcs.py

index aa177de077eb731b44b4054dc47d85b8ce34101d..80291c40bb525f95faaefd65d3575881f1294b3a 100644 (file)
@@ -133,10 +133,18 @@ def calc_1rm(args: argparse.Namespace) -> tuple:
             row.append(int(_values[_rep]))
         _all.append(row)
 
+    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     # Print results
+    # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     print()
     print("Results for: epley, brzycki, and dos_remedios")
     print()
+
+    # Print the n=1 average for all three calculations
+    _avg_1rm = round(sum(_all[0][1:]) / len(_all[0][1:]), 1)
+    print(f"1RM:    {_avg_1rm}")
+    print()
+
     _table = tabulate(_all, headers=["n", "epl", "brz", "rmds"])
     print(_table)