Health Management System using Python
Sometimes we are so busy that we are not even able to care for our body and by caring we mean fitness, food, exercises and much more, and then we think that we need to make our diet plan or exercise plan to maintain our body. So let’s make a Python script to maintain this record for us. In this program, we add our diet and exercises that we need to do, or we can save our daily diet or exercise with date and time to keep records. It also helps us to make another fitness plan.
In this program, user input their diet and exercise, and then we save the input with the date and time, so whenever the user wants they can see their routine. Following operations will be performed under this:
Attention reader! All those who say programming isn't for kids, just haven't met the right mentors yet. Join the Demo Class for First Step to Coding Course, specifically designed for students of class 8 to 12.
The students will get to learn more about the world of programming in these free classes which will definitely help them in making a wise career choice in the future.
- getdate(): Tracks date for data so that log retrieval can make sense
- selectname(): This function lets the user select the person on which the required tasks are to be performed. This function first gives options to choose between two people and takes the input as an integer. This is then returned for further processing.
- select_file_action(): This function accepts what should be done to the file i.e. either the file should be used to write the data (log) or retrieve the existing data. This again takes integer arguments and returns them.
- select_task(): This function helps specify data related to what task has to be entered. The choice here given is between food and exercise. This again accepts integer input and returns it for further processing.
- action(): Performs appropriate task according to the inputs returned by above functions by condition checking.
Below is a complete implementation.