Inspiration

A member in our group had gone to a wedding recently, and wondered how many calories he had eaten that day and what else he needed to eat to be healthy. That simple question led to the Cool's Calorie Counter.

What it does

Cools Calorie Counter is a program that helps you accomplish your calorie goal. It does this by taking a goal that the user inputs and asks what foods they have ate. If the code has that food, then it would add those calories to your total and to the calories that you have ate for that food group (fruits, vegetables, dairy,protein, grains, and fats/sugars). If the food is not found in the list, it would ask what food group it is and how many calories the food is then adds it to the database. After inputting all of the food, the counter shows how many calories that you have ate, how many more calories you should eat in each food group, and food recommendations to meet your goal.

How we built it

To create this, we used Python and Spyder IDE. We first created a database with all the foods, their food group, and calories. Then we started the user inputs. The user would input their name and then their calorie goal for the day. We had to make a dictionary using the file to create something that the code could pull information from. Afterwards, we coded the portion where the user has to input the foods that they have eaten. This would pull data from the dictionary and assign the right amount of calories. After that, we coded the part where it shows how many calories per each food group was eaten and how much was left (if there was any missing calories). Once that was completed, the code would provide foods that the user could eat if they were missing calories for the food groups.

Challenges we ran into

One challenge that we ran into was the food database. With our limited time, we decided that the best way to create the food database was to first create a base with simple foods. While this took time to take foods and make them into the proper structure we completed it but ran into a problem. Many popular foods like burgers, hotdogs, and nachos were not on the database. Instead of using more time to add the foods, we created some code that would add a food item if it was not in the database.

Accomplishments that we're proud of

One accomplishment that we were proud of was being able to find a way to complete a food database. In addition to that, we were proud when we were able to figure out how to add new foods into the database without putting in hours of work. Another achievement that we are proud of was combining the six food group files into one file and edited the code to work for that.

What we learned

At the beginning of the project, we had to gather all sorts of food that we needed to put on the counter, which required a lot of online research. This taught us how important research was to a project. Immediately after, we splitted into two parts; one part for coding, the other part for organizing the food. This split allowed us to more effectively use our time. Finally we learned the importance of communication among the group due to occasions when the same work was being done twice.

What's next for Cool's Calorie Counter!

We can continue to refine the calorie counter so it can be made into an app but there are many things that can also be improved beforehand. We can allow foods to be placed in more than one food group (as of now, foods only have one food group) as well as the amount of calories a food has for multiple food groups. We could also include more foods that are popular among everyone

Built With

Share this project:

Updates