Health Manager : Python Mini Project

Sushant Gaurav
2 min readApr 26, 2021

--

Lets built a Health Management System in Python.

What we are building?

The task is to build the health management system using file handling in Python that helps to keep track of all the diets and exercises a user has taken in a file. We will give access to 3 user (can add more users) and each user will have their own data set in respective file.

Below are the features to be implemented:

  • Add Exercise.
  • Add Diet
  • View Diet.
  • View Exercise.
  • Exit.

Approach:

  • All the functions will be provided under if-else ladder.
  • First we will print the name of the Management System below that we will run a while loop that can be terminated using exit.
  • We will give 3 options: Add data, View data and exit; we will receive the user input and run the respective if condition.
  • In both add and view data, user name will be asked and then respective inner if-else ladder will be executed.
  • For each user we will create separate files for exercise and diet. Files will be created only once and for the next time, more data can be added to same file (using append option of file handling).
  • NOTE: We also use datetime to get the time and date of the entries. We will define a function and inside that function, we will import datetime module.

Below is the implementation of the above approach:

Some Outputs:

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Sushant Gaurav
Sushant Gaurav

Written by Sushant Gaurav

A pragmatic programmer 👨🏻‍💻 with a sarcastic mind 😉 who loves travelling and food :)

No responses yet

Write a response