Skip to main content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

Python for Basic Data Analysis: 1.1 Getting started - Hello, World!

Get started on your learning journey towards data science using Python. Equip yourself with practical skills in Python programming for the purpose of basic data manipulation and analysis.

Getting Started

Welcome to Unit 1 of the essentials of Python for use in data analysis.

This unit will cover the basic syntax, data types, operators and statements that will become the fundamental building blocks in your Python journey.

Hello, World!

Printing "Hello, World!" has become a "rite of passage" for someone starting to learn programming. The program below uses the  print( )  function to show you the output which is a string(text) that says "Hello, World!". Keep this function in mind as we will need to use it in Units 1.2 and 1.3 before we talk about it in Unit 1.4.

 Run your first Python program by clicking the Run button! 

Programming is the process of creating a set of instructions that tell a computer how to perform a task. It allows us to design how we want a computer to do a certain task and solve problems.

Python is a High-Level Programming language. High-Level means the language is closer to human language instead of machine language (more independent of a particular type of computer). It was created in 1991 by a guy named Guido van Rossum and it was designed to emphasize code readability.

Some Applications of Python Programming:

  1. Web Development
  2. Machine Learning to predict trends
  3. Building game applications
  4. Data Analysis
  5. Automate certain mundane/repetitive tasks such as
    • Sending mass emails from a list of recipients
    • Search for text in a file or across multiple files
    • Create, update, move, and rename files and folders
    • Send reminder emails and text notifications
    • And more!

Programming can perform almost anything!

Syntax is a set of rules defined by the programming language. Syntax is essential in letting your computer understand exactly what you are trying to say in your code. If you do not follow these set of rules, you may come across syntax error, and your programme may not work correctly.

Examples of syntax errors: 

  • an extra dot or comma in your code
  • a missing semicolon at the end of a set of codes

Unit 1 will cover the basic syntax of Python programming. 

How to use this guide

Each sub-unit comprises of an explanation section, Exercises section, Video Guide section and Further Readings.

We recommend that you go through the explanation section and attempt the exercises. The video guide and further readings acts as a supplement to the basic information that is required for you to complete the activities. 

Examples will be shown using embedded interpreter. 

How to use Python - An Introduction to IDEs/IDLEs

Python can be run using Integrated Development Environment (IDE) / Integrated Development Learning Environment (IDLE).

IDE is a software environment which usually consist of a software development package containing Code Editor, Build Automation, Tools and Debugger. IDLE is the specific IDE for Python.

We will use IDEs to write, read and execute Python codes so that we can perform the tasks we require.

Browser-based IDEs (Beginner friendly!) :


Types of IDEs that you can download for Python :

  1. JupyterLab
  2. PyCharm
  3. RStudio

Steps to install and create your first workbook (PDF with step by step illustration available in Downloads Box)

  1. Go to Anaconda Webpage.
  2. Scroll down to select your preferred OS and select the 64-bit installer (Python 3.7 version) if your machine runs on 64-bit, or alternatively select the 32-bit installer.
  3. Launch the installer, and follow the recommended settings during the installation.
  4. Click on the “Jupyter Lab” tile
  5. Click on the file browser tab and select a folder to create your first workbook on
  6. Create a new workbook under the “Notebook” section in the main page