Uploaded by Jiaqi Jiang

Lecture 5 Python (1)(1)

advertisement
Lecture 5
Python Programming (1)
Basic Statistics
• Any questions about the Statistics part of the course?
• Any questions about Class Exercise 4?
• Any questions about Individual Assignment 1? (Due 21 Oct 2022)
Please start do Individual Assignment 1 early!
2
Consultation Hours
3
Python Programming
• Starting from this week, we will be learning Python
Programming.
• Please bring along with you a laptop so that you can
do coding exercises during class.
• We will follow the book Python Projects for Beginners:
A Ten-Week Bootcamp Approach to Python
Programming by Connor P. Milliken (Apress, 2020),
which is available from https://libgen.is/ .
4
Outline
Chapter 1: Getting Started
Chapter 2: Python Basics
5
Installing Jupyter Notebook
• Either follow Chapter 1 of our textbook to install Jupyter Notebook on
your computer,
• Or, follow this link: https://www.geeksforgeeks.org/how-to-use-jupyternotebook-an-ultimate-guide/
6
Using Google Colab
• I will teach with Google Colab which is a free cloud-based service that
executes Python code using the Jupyter Notebook format.
• To use Google Colab, we only need a web browser (and a Google
account).
• You may use Google Colab during class if you prefer, but you must
learn to use Jupyter Notebook outside class – this is an important
skill for a data scientist!
7
• Programming is best learned by doing. The following two little books
contain exercises and challenges (with solutions). Highly recommended
for beginners! Practice makes perfect!
8
Don’t copy and paste! Type the code out yourself!
• “Python is designed to maximize human readability, and as a consequence,
it's common to feel that you have a good understanding of something
because the code on the page makes sense and seems obvious, only to find
yourself at a loss when you try to write the same code yourself. That's
totally normal. You must resist the temptation to copy and paste. You will
understand more, identify what you don't understand, and gain mastery
faster, if you actually type the code out yourself and run it. Your future self
will thank you.”
9
Download