This project is a simple steps tracker that sorts users based on the number of steps they have taken and plots their performance over the day.
main.py
: This is the main file that contains all the functions.
-
find_min_index(input_list)
: This function takes a list as input and returns the index of the smallest element in the list. -
my_sort(user_names, user_steps)
: This function takes two lists as input: a list of user names and a corresponding list of steps taken by each user. It sorts the users based on the number of steps in ascending order and returns two lists: a list of sorted user names and a list of sorted user steps. -
plot_line(steps)
: This function takes a list of steps as input and plots the steps over a 24-hour period.
To use this project, run the main.py
file. You will need to provide two lists: a list of user names and a corresponding list of steps taken by each user.
This project requires Python and matplotlib.