Introduction
Python is a versatile and beginner-friendly programming language. This tutorial will cover the fundamentals of Python programming, with a particular focus on data analysis tasks.
We first review the basic data and programming structures in Python, most of which should be familiar to you from CSC108. We then cover three basic topics to get you started with data analysis in Python:
- Work with arrays (using the NumPy library).
- Process tabular datasets (using the Pandas library).
- Perform a simple regression analysis.
This tutorial site is somewhat “special” as you can try out the code snippets in the tutorial and see the results immediately in the browser.
As a result, you may find the site loads slowly because it needs to load the Python interpreter, certain libraries and datasets, so please be patient.
As an example, let’s start with a simple “Hello, World!” program.
Click the “Run Code” button to run the code snippet. You could also edit the code in the code block. For example, print a different message if you like. If you want to reset the code snippet back to the original, click the “Start Over” button.
You will also see exercises throughout the tutorial to help you practice what you’ve learned.
Exercise ☕📝
Print the message “Python is fun!” in all uppercase and add two more exclamation marks at the end.