- Enter Python interactive mode
python3
Be sure you type "python3", not "python".
Typing "python" will run the wrong version of the Python interpreter.
- Use the
help()
function
>>> help("topics")
- Use this function to learn more about assignment in Python
>>> help("ASSIGNMENT")
- Advance through this help entry
Keep hitting Space until you get to the end.
- Quit this help entry
Type q to quit.
- Create some variables
>>> a = 5
>>> b = 6
>>> c = 10
- Check the values you have just entered
>>> a
>>> b
>>> c
- Perform some arithmetic
>>> a + b + c
>>> a * b + c
>>> a * b * c
>>> a * b / c
- Print some phrases
>>> print("Hello world!")
>>> print("Go Red Sox!")
- Quit interactive mode
>>> exit()
For help with the work below, see this