#PythonNoob — Will I be a snake charmer or will I be attacked by one?

Suzanne Chen
4 min readOct 25, 2020

--

My first foray into Python

With a leap of faith (and the fact that we are grounded with no work travels), I thought what better way to end off 2020 than picking up some new skills?

As a Marcomms person, I’ve decided to pick up some data storytelling skills — the essential data science skill that marketers (if not, everyone!) needs. Will I be a step closer to being a data scientist or will I be attacked by Python (the programming language for Data Analytics) even before I become close to being a data scientist? Only time will tell.

Over the next months, I’ll be sharing my learnings in basic Python as part of a Specialist Diploma in Data Analytics that I’m currently pursuing. Join me on this journey!

In this first post, I’ll share:

  • Python
  • Setting up your environment
  • Print ()
  • Arithmetic Operators

Why Python?

Python has been said to be one of the easiest languages to pick up. Having learned Javascript many years back (and fairing poorly at it), I am curious to see if it is indeed as what it claims and if someone like me would be able to easily pick it up. Of course, with that said, this language was chosen very much in line with the Data Analytics module.

So you will hear from many developers and advocates about Python and that it was conceived by Guido van Rossum as a hobby project and soon became a programming language. Because it is open-source (i.e. Free), and is able to build almost anything. The community is huge (I have personally witnessed it when I was at PyCon India 2020 just last month), so you can definitely find out more by being part of the community. For now, I’ll jump right into setting up the environment and the Python basics!

Setting up your environment

(i) Anaconda

We spent the first lesson learning how to set up Anaconda an open-source distribution platform of Python and R Programming languages for scientific computing.

Pick one of these Anaconda Installers that work well for your machine. You will also be able to pick one of the older versions in their archive directory.

Source: https://www.anaconda.com/products/individual

ii) Prompt

If you prefer to code through shell, you could also launch Python by simply typing iPython (Interactive Python — part of the Jupyter’s ecosystem)

Want a fancy Terminal? You may also want to download iTerm a terminal emulator for MacOS.

(iii) Jupyter FTW

So for a noob like myself, Jupyter (PS. The lecturer was sure to remind us that it is pronounced as Ju-Py-Ter and not Jupiter!) may be your next best bet coding environment. It is web-based, interactive, and apparently can compute other languages as well! After downloading Anaconda, you’ll find Jupyter and be able to launch the notebook right away. You may find also find this tutorial relatively helpful.

Now the basics.

Print ( ) Function

This basically prints an output. Know the evergreen “Hello World!” liner that every geekycool developer would first print?

You can also learn to include separators to break your sentences/lines. \n brings you to a new line, \n\n gives you a double spacing

And you noticed I have been adding comments to my scripts. Simply use the # tag.

Arithmetic Operators

You can use this print () function to do some simple calculations!

Your handy guide of operators :)

There you go! You’ve learned some scripts to make Python do simple arithmetic calculations for you! I thought these were pretty fun to learn. Give it a try and tell me what you think! Do you have more tips to share?

In the next post, I’ll be sharing more about Variables and Types which allows more complex calculations. I thought they were harder for me to grasp but with a couple of practices, and loads of guidance from available resources, they were made easier.

--

--

Suzanne Chen

A Marcoms professional and a cat shepherd. If she is not herding cats at work, you will find her playing with her four cats at home.