Goal of Week 1

This week, we will:

  • Spend a little bit of time getting farmiliarized with Python the language. What we think are the pros and cons with the language.
  • Install Python.
  • Learn some basic operators in Python.
  • Learn about variables and the different types of data in Python (int, float, string, etc.).
  • Learn about getting user's input using the input() function.
  • Write our first if, else if, and else statements.

Note

  • In this notebook, I will run the code cell-by-cell to show you the error and the result that Python gives out every time we run a snippet of code. However, you will most likely use a IDE (a.k.a Integrated Development Environment) like the default Python IDE, PyCharm, or something else, which is absolutely fine.

Let's get started!

1. Install Python

  • If you haven't had Python installed, head to this link and click ‘Download Python 3.5.2’
  • Install :)

2. Open Python & Create Our Program

To run Python, search your program for IDLE. Open that program.

Now something like this will popup:

That's a Python shell. You can play around with the console like assigning variables, adding numbers, using it as a calculator and it's pretty nice.

However, typically we want to write something nicer so for our purposes, we will write Python scripts or programs. Let's do that.

Choose File -> New File. Now another blank screen will pop up. Let's write our first simple program. Type . . .

print("Hello World")

Now go back to the navigation bar and click Run.