Skip to content

vmendes93/Math-and-Science-with-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Let's Learn Science with Python

1. Who are you and what's the point here?

Hey! Glad you got your interest drawn here. Once, the great Yahtzee Croshaw said: "Producing stuff on the internet is like writing a message in a bottle while stranded on an island - you'll send thousands of those knowing they won't return but, eventually, one floats back with a reply".

Well, he didn't say exactly this, with these exact words but It's a greta and valid example. My name is Vinicius - you can call me Vince - and this is my content: I want to teach math and science using the programming language Python.

My end goal is to make science and math something easy and accessible to learn and not a bunch of hieroglyphs scribbled on an old, yellowed-out, paperback book. I want to contextualize and make people interested in such subjects, particularly people who were never fond of them in the first place.

So, want to learn more about it? Come with me, I'll talk you through the project's details.

2. Why is this important?

Teaching math is no easy task. Throughout my academic and professional life, I have noticed that math is simply something people gloss over during elementary, middle, and high school, struggle a lot during college, and forget what they memorized for the tests. My case was no different. But now, since I have both the knowledge both in teaching and in progremming, I think it's high time I start this basic teaching project so people won't struggle as much as I did. On that note...

3. Brief background and history

During my childhood I struggled with math due to bad teachers and a terrible school system, but I challenged myself in getting better at math and hard sciences in general and, by high school's end, I had a decent understanding of math, decent enough to get me through entrance exams and being accepted into college; however, I've always felt some gaps in my knowledge and college certainly wasn't the time or place to fill those.

Chemistry-related subjects were no problem at all, since their math is relatively easy; calculus, shockingly, was easy enough but I guess I was lucky to have teachers who weren't cruel with their tests. Physics classes - from mechanics, thermodynamics, and electromagnestis - were an absolute failure from my part. I must have failed those classes two times at least before I could get passing grades. That not only was disappoint but very frustrating and demotivational. It made me feel like an impostr for the first time (back in 2011 we didn't have the term impostor syndrome but it fits perfctly in this scenario).

After college, I promised myself to return to these "difficult" subjects eventually as (again) another challenge. Since I jumped through the hoops and know what is really hard for people like myself, I'm also commited in helping out by teaching things with all the tips and tricks to make people's lives easier. I hope no one needs to feel as bad as I did back in the day.

4. Who these lessons are aimed at?

Anyone who struggled with math and wants to learn it. Plain and simple. Also, if you teach math or sciences, this is also a great template on how to add computational tools into the classroom - something I wish it were more commonplace in all schools because, and I can't stress this enough, it makes students' lives easier and shows math ans sciences in a diferrente light. Instead of a undefeatbale, incomprehensible, lovecraftian horror, math becomes more of a intereting series of case studies and fun but elusive puzzles that putts your noggin' to a joggin'.

5. Are you following any particular books or mtehodologies?

Starting up, I won't follow any specific books. I'll grab whatever I have here in my bookshelf and turn the subjects into concise lessons in a Jupyter Notebook format. I'll definetly make sure to cite all my sources, but since I'm not doing any academic research here, you can definetly expect to find some Wikipedia articles here and there. Not to worry - I'll be just following the topics I think ar emore natural to start and progress from there. By the way, since I've mentioned lessons...

6. Classes order or program/syllabus?

This is an interesting point. I'll try to start with basic Number Theory coupled with some basic Set Theory concepts, then algebra - expressions, functions, etc. Finally, going through pre-calculus, first-year calculus, and, finally, second-year calculus. This'll be enough (for now) because I want to follow this up with physics lessons - starting with mechanics, then going through thermodynamics, and finishing up with electromagnetism.

Meanwhile, any suggestions or addtions are more than welcome and I'll be glad to create side branches or appendices to the classes. If any of you reading is a real-deal math or physcis teacher, feel free to contact me and send me suggestions. I cannot compensate you finnacially but, maybe I can buy you a cup of coffee if that's ok. I'm doing this project during my free-time and I intend for it to be free and open-source, so anyone intered can caontribute and use it.

7. Okay, I'm ready. What do I need to start?

I'll be teaching math and science through Python - in a way, I'll be teaching Python indirectly - but, basically, you'll only need:

  • A basic laptop with an internet connection
  • Some paper and a pen or pencil (optional)
  • Python installed in your system
  • Some time along your schedule to practice

I guess that if you're reading this online the laptop and internet parts are okay. Nevertheless, it's good to emphasize that it doens't need to be a top-shelf, running-triple-A-games at ultra resolution graphics. A simple machine with 500GB of memory storage, a simple Intel dual-core processor, and 4GB of RAM can do the trick. Obviously, a better PC will be less annoying but I know what it is to have a terrible system and no money to upgrade it so don't worry about it. Anything you have will do. Just be sure to check if your system isn't requiring too much RAM, this can cause some issues and generally drag down processing time.

The OS can be any of your choice - Windows, Linux, or Mac - it really doesn't matter. Python runs perfectly in any of them; as a matter of fact, most Linux distributions come with Python as a main component in the system, so for all your Linux users out there you can skip the installing step and dive right in. I'm not sure about Mac but, in any case, just check if it comes installed and, if it doesn't, it's as easy as downloading it.

8. Downloading Python and setting up my enviroments

Python is easy to set up. You know what is even easier? Me walking you through ou how to do it. For these lessons, we'll be using Jupyter Notebooks - which are basically programming files which you can execute in chunks - or cells. This is easy because you don't have to run an entire .py script and check the output on your terminal, neither you need an IDE (Integrated Development Environment) such as VSCode, Pycharm, or Sublime. I mean, they are great and can run Jupyter notebooks, but, for our current goals, it's a little overkill.

If you're struggling with your system's performance and need an alternative, you can use Google Colab and start a .ipynb file right away; not only this resoruce ir plenty useful for weaker systems, but also helps you in a pinch, i.e. you're stuck with your comapany's crappy laptop during a business trip, or maybe you have an old, shared, family computer that really can't take it anymore. Google Colab got you covered.

8.1. Windows setup:up:

If you are using Windows 10 or 11, do the follwing:

  1. Access Microsoft Store
  2. Search for Python in it
  3. Choose Python3
  4. After the installion has concluded, open Windows Power Shell and type Python --version to check if everything was installed correctly. At the time of writing this, it should be Python 3.10, but 3.9 through 3.7 will certainly do the trick
  5. Also check if the installation package comes with pip. Pip is a basic package management system that Python uses to install and manage packages - something we use quite frequently while programming in Python
  6. Use the command pip install jupyter to install the Jupyter Notebooks package
  7. Test opening a notebook by typying jupyter notebook on the Power Shell, and when it opens it'll open you browser window and give you an overview of your local computer files

If all of these steps check out, you're good to go. I'd suggesting creating a folder to save all your notebooks in and create one to play around and get yourself familiarized with the tool.

8.2. MacOS setup:up:

  1. Open your terminal
  2. Type in which python or which python3. If it returns something like /usr/bin/python, then you're all set. Just pip install jupyter and let's get this show on the road
  3. If it doesn't return nothing, or returns that your running python2, type in brew install python3
  4. After that, install pip: sudo pip install --upgrade pip
  5. Finally, install Jupyter Notebook.

MacOS is really something I have never ever had contact with so I'm gathering this info form online tutorials. If something goes wrong let me know and I'll update this small walkthrough.

8.3. Linux setup:up:

Most, if not all Linux distros, come with Python already installed so:

  1. Open your terminal and check with the command which python or which python3
  2. If it returns /usr/bin/python then you're all set; if it returns which: no python in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr...), then you need to do the next steps
  3. For Debian flavored distros (Ubuntu, Mint, PoP_OS, etc): sudo apt-get install python3 followed by sudo apt-get install python3-pip
  4. For Fedora flavored distros (OpenSUSE, CentOS, Fedora, RHEL, etc): sudo yum install python3 followed by sudo yum -y install python3-pip

If you're using Arch (btw) distros, or (holy crap) Gentoo, my best guess is that your skills are far beyond these lessons and tutorials; in any chance that you are indeed using any of these distros and is still looking to understand the basics of math and physics, you probably don't have any problem to install and run python and its packages - heck, you might be a computer whiz already and is only doing this as a hobby so no problem there.

After all of this is done, you have to install the other packages we'll be needing throughout the lessons. You don't have to install them right away - I'll be telling which packages we'll be needing on a lesson-by-lesson basis. But, the one I really think you could install right away is Sympy because it's the one we will be using the most and probably start off with during the first lesson.

Other packages we will (probably) be using:

  • Scipy
  • Numpy
  • Matplotlib

9. What is Sympy?

Basically, a symbolic computational package to do any math related problem - physics, engineering, and math. Maybe even geology... who knows? Read more about it on it's documentation page.

10. Ready to get started?

I'll be trying to release one class per week for the forseeable future. Keep in mind that I don't have a deadline, neither am I working with set time goals - maybe I'll do this more often when I have a low work volume, maybe I'll postpone releases if my work increase - in any case, I'll start in weekly or bi-weekly release schedule and work up from the math basics until we reach multivariate calculus math, so this might take a while. If I see I won't be able to release a new class during the week but I still got the time for something, I'll try a mini-release such as a mathematical curiosity or maybe something releated to Linear Algebra. Hope you enjoyed so far and let's get started!

About

My side project where I teach math through Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published