Menu

Calorie Tracker

I created a simple calorie tracking tool using Python that allows a user to input calories consumed and calories burned for multiple entries. The program calculates the net calories for each entry and identifies whether the user is in a calorie deficit.

The tool uses a loop to continuously accept input until the user chooses to quit, and stores each result in a list so the data can be tracked over time.

https://pytwiddle.com?source=def+calorie_def%28calories_net%29%3A%0A++++if+calories_net+%3C+0%3A%0A++++++++print%28%22A+calorie+deficit%21%22%29%0A++++++++%0Aentries+%3D+%5B%5D%0A%0Awhile+True%3A%0A++++calories_in+%3D+int%28input%28%22Enter+calories+consumed%3A+%22%29%29%0A++++calories_out+%3D+int%28input%28%22Enter+calories+burnt%3A+%22%29%29%0A%0A++++calories_net+%3D+calories_in+-+calories_out%0A++++++++%0A++++calorie_def%28calories_net%29%0A++++entries.append%28calories_net%29%0A++++print%28f%22Here+are+your+total+entries+so+far%3A+%7Bentries%7D%22%29%0A%0A++++choice+%3D+%28input%28%22Hit+enter+to+enter+another+amount+or+%27q%27+to+quit%3A+%22%29%29%0A%0A++++if+choice+%3D%3D+%27q%27%3A%0A++++++++break

Calorie Tracker - image 1 - student project