Skip to content

πŸ“ˆ This Python script uses BMR and activity level to determine daily calorie requirements, calculates BMI, and provides weight management advice for maintaining a healthy weight.

License

Notifications You must be signed in to change notification settings

TheHumanoidTyphoon/calories-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Calories Calculator

This is a Python program that calculates how many calories an individual should consume daily based on their BMR (basal metabolic rate) and activity level. It also calculates the individual's body mass index (BMI) and provides advice on how to maintain a healthy weight.

Requirements

  • Python 3.x
  • MySQL
  • The mysql-connector-python and requests libraries for Python.

Installation and Setup

  • Clone this repository to your local machine.
  • Install Python 3.x on your machine if it is not already installed.
  • Install MySQL on your machine if it is not already installed.
  • Install the mysql-connector-python and requests libraries by running the following command in your terminal:
pip install mysql-connector-python requests
  • Create a MySQL database and set the HOST, USER, PASSWORD, and DATABASE variables in the code to match your database settings.
  • Obtain an APP_ID and APP_KEY from the Nutritionix API and set the APP_ID and APP_KEY variables in the code to your own API credentials.

Usage

  • To run the program, navigate to the directory where the program is saved in your terminal and run the following command:
python calories_calculator.py
  • Follow the prompts to enter your gender, weight, height, age, activity level, and dietary restrictions. The program will then calculate your daily calorie requirements and BMI, and provide advice on maintaining a healthy weight.

Contributing

This project is open to contributions. If you would like to contribute, please follow these steps:

  • Fork the repository and clone it to your local machine.
  • Create a new branch for your feature or bug fix.
  • Write your code and commit your changes.
  • Push your changes to your forked repository.
  • Create a pull request with a detailed description of your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details...

About

πŸ“ˆ This Python script uses BMR and activity level to determine daily calorie requirements, calculates BMI, and provides weight management advice for maintaining a healthy weight.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages