Hey, guys.
Welcome to Day 38 of 100 Days of Code.
Now, today, I've got a challenge project for you.
And this challenge project is going to be building an Exercise Tracking Application using Python and
Google Sheets.
One of the things I've been trying to do recently is to track my workouts, and I've been doing that
on pretty much pen and paper.
But wouldn't it be nice if we could track the workout that we're doing?
What time?
How long we've been doing the exercises for, and also figure out how many ice creams we can eat because
of the workout that we did.
So tracking the amount of calories we've used up as well.
Now, a lot of the inspiration for this project comes from the recent news on the OpenAI's GPT3
AI model. And it's a really smart natural language processing model where, for example, if you went
onto Wikipedia, you found an article on bread,
you decided to use this model to ask it, well, why is bread so fluffy?
It can actually search through all of the text and find you the relevant part.
So it's doing some intelligent stuff behind the scenes to understand what you're saying, and also understand
what the article is all about,
and this is called natural language processing, but it's just a very powerful one.
Now, in our case, we're also going to use natural language processing, and we're going to write down
the exercises that we did but in a normal English sentence.
And at the end of the lesson, I'm going to show you a way that we can run our Python console online
using an online code editor.
Now I've pulled up this same page but on the Chrome browser on my mobile phone.
So this is what I might do after a gym workout, or after a quick cycle,
and what we're going to try and do is to get the data to go into our spreadsheet here on Google Sheets.
So here I'm going to type that I ran 5K, and cycled for let's say, 20 minutes.
So this is my full input and it's pretty much just a plain English sentence.
Now I'm going to go ahead and hit Return to trigger the code to run,
and immediately you can see that my activities have been logged. So the date and time have been added
automatically.
It's understood that one of my activities was running and it figured out the duration based on the distance,
So on average, it might take somebody 31 minutes in order to 5 kilometers.
And then it worked out the number of calories I've expended doing that activity.
And it did the same thing for my cycling, except this time the duration comes from my input and the
calories is calculated automatically.
So this is really exciting.
And the best part?
You're going to be building it all by yourself.
You're going to be using a bunch of things that you've learned so far, including the Python DateTime strftime()
method, using APIs, making POST Requests, creating Authorization Headers, and Environment
Variables.
You're going to be doing a bunch of this step-by-step by yourself, and if you head over to the next
lesson, there's the instructions for how to get started.
So I hope you're excited to get started and I'll see you on the next lesson.