Python

Getting Started

Getting started with Python can seem intimidating at first, especially if you’re new to programming. However, with the right tools and a little bit of knowledge, learning Python can boost your skill set!

The first step in getting started with Python is to install Python itself. Python is available for download at https://www.python.org/. When you visit the website, you’ll see that there are two versions of Python available: Python 2 and Python 3. Python 2 is the older version of the language, and is still widely used, but Python 3 is the future of the language and is recommended for new projects. It’s important to note that Python 2 and Python 3 are not fully compatible, so if you’re starting a new project, it’s best to use Python 3.

There is quite a difference between Python 2 and 3. Ensure you are using Python 3, especially if you’re following along.

Once you’ve downloaded and installed Python, you’ll need a code editor to write your Python code. There are many code editors available, and the one you choose will depend on your requirements. Some popular code editors for Python include PyCharm, Sublime Text, and Visual Studio Code, however Visual Studio Code is recommended for beginners.

icon
icon
icon

You may also want to consider using Jupyter Notebooks for your Python development. Jupyter Notebooks are interactive documents that allow you to run code, write text, and create visualizations in a single online document. They are particularly useful for data analysis and scientific computing, as they allow you to easily visualize your results and share your work with others.

Once you have your text editor, it’s good to start familiarising yourself with some Python code. It’s also worth noting that Python is a dynamically-typed language, which means that you don’t have to specify the data type of a variable when you declare it.

num = 5
if num < 10:
    print(‘Less than 10’)
else:
    print(‘Greater than 10’)

This can make Python code more flexible and easier to write, but it can also make it harder to debug if you’re not careful. Statically-typed languages like C and Java require you to specify the data type of a variable when you declare it, which makes the code bulkier and harder to read through.