• It imports the library for the api at the top
  • Creates an empyt dictionairy to store the user data.
  • It requires a username and if you don’t give one it says username is required and if it is there then it assigns it to the user
  • It stores all the users data in the dictionary
  • if statement ensures the flask server runs the script

  • Creates the API
  • It defines all the users variables as data
  • It calculates calorie maintnence to input it into the data base.
  • It does the calculations and stores it as the variable “calorie maintnence”