...
(setup notebook)
Python Data Types
The building blocks of a program are variables, which store data in a variety of forms. This data can be made available to the programmer and used later in the program in multiple ways.
Numbers
First, let's work with numbers in Python. By typing the code shown below, we can store the number 3 in variable a, and the number 4 in variable b.
We can check the values of these variables by using the print function as shown below.
Click the "Run" button to run the code in the current cell as indicated below.
After running this cell, we can see the values 3 and 4 appear just below the cell that has been run.
Now, we can run some basic arithmetic operations with these numbers. The operations shown below correspond to addition, subtraction, multiplication, and division, respectively. After printing each of the corresponding variables, we can see the results.
(add floats next)
Booleans
Strings
Lists
Dictionaries
Functions
...