Saturday, July 6, 2019

Project Idea

             Since I learned so much about Python through my Udacity courses, my dad suggested that I share some of the enriching ways to code that I learned. So, in this post I will walk through how I would program my computer to alert me on the day a movie I want to watch comes out in theaters, an idea I got from my second Udacity course.
             As an example, I will code the program to alert me in four days by opening a browser that shows the date that the movie comes out.
Step 1
             The first thing I will do is use a really useful function called "webbrowser.open," which will control the browser that will come up when the movie comes out. I've used youtube as an example, but a more specific link can be put there instead.
Step 2
             When I've tested this code and made sure that it works, I will move on to control how long the program will wait before opening this browser. I will use the "time.sleep" function to make the program wait for eight seconds first, to test the program easier.
Step 3
             Once I'm sure that the program works, I will now make the program wait four days. Since the computer counts time in seconds, I multiply the numbers to make the program wait the right length.
             If I want to have the program remind me every day after that for four days, I can also add a loop to my code.
Step 4
             There are lots of other ways to use these same functions, and that's one of lots of reasons I like Python. Making this code reminds me of all the possibilities learning Python opens up, and it makes me feel empowered.


             

No comments:

Post a Comment