Skip to content

What Python Is Used For? Science, Games, and more

I’m sure you’ve read the previous article about is Python interpreted or compiled, in this new article we’re going to explain what you can do with Python.

I know, you’re excited, I’m excited too; not just because python is my favorite language and I’m teaching it. but maybe you’re not sure where Python fits into your programming life.

Here are some of my favorite things about Python. it’s basically everywhere, it’s super small so it shows up on embedded devices and pretty much every server ever. it’s also a really simple language so people pick it up quite often for work or just some server automation.

Python For Science!!!

Python has several great libraries for building web apps, the language itself is great for handling HTTP but when you want more, Flask, Pyramid and Django are all excellent choices for building the next great startup. If you’re worried about scaling, Discuss, Mozilla, PBS, NASA and Reddit all use Python for their websites.

Python is very heavily used for scientific computing and even has several libraries dedicated to specific areas of science. Numpy and Scipy are both for general purpose, but there’s EarthPy for Earth Sciences, AstroPy for astronomy, and others. in fact, let’s take a look at an EarthPy notebook for plotting out sea ice thickness:

earth py for sea ice thickness
earth py for sea ice thickness

This is an EarthPy ipython notebook page, when I got to talk about Ipython notebook in the first course, but this is a cool way of getting to see some of the stuff that Python can do.

We have this notebook file and you’ll notice these lines that say in, these are actual Python code being put into this notebook which we can also put in HTML markdown and things like that.

Python is used for earth py for sea ice thickness example
earth py for sea ice thickness example

When you run one of these cells you get the output, so in this case we’re looking at all the keys that this data set has and there’s all these things. We can use those with other libraries like Matplotlib and we can have it generate maps and graphs for us.

Python is used for sea ice thickness earth pu
sea ice thickness earth pu

In this case it’s building a color bar for the sea level or the sea ice thickness. We can have it generate different kinds of images for us, and we can even use other things like in this case base map to generate overlays on-site of maps.

Python is used for overlays maps earth py
overlays maps earth py

Games, Desktop Apps and more

Maybe you want to prototype your game, or teach game development to kids. PyGame has you covered, it’s a straightforward game development library that supports sounds, mouse, keyboard interactions and more. The popular 3d application Maya supports Python.

Python is also popular at film and animation companies like Disney, and Lucasfilm. Or maybe you want to make desktop applications, Python comes with tkinter built in and there are many other GUI libraries available online.

Hopefully this gets you even more excited for Python all right back to the course production for me and I’ll see you inside My Python Beginners Course.

Leave a Reply

Your email address will not be published. Required fields are marked *

error

Enjoy this blog? Please spread the word :)