Learning to Program in Python
Bau David, Wentworth Peter, Jeffrey Elkner, Downey Allen, Meyers Chris, Russell Mattew · EdShare Southampton (University of Southampton) · 2011
The >>> means that python is waiting for you to program something. Running Python at HomeIf you want to try out Python at home, you can download it for Mac or PC from http://www.python.org/getit/-If you use Python on Windows, after you've downloaded and installed it from the Python Website (using the Windows Installer download), you can go to the Start Menu and select IDLE (Python GUI) to start Python.If you use a Mac, Python comes with the computer.For more instructions on how to use it on a Mac, read the original guide at http://davidbau.com/python/printable.htmlKeeping a Secret Python can remember things, so let's tell it to remember our secret word.>>> secret = 'crocodile' >>> You can tell it to print something by saying print.>>> print(secret) crocodile >>> Python will remember the secret until you quit.So you can always go back and print your secret again by saying "print secret."Now try to print something python doesn't know.>>> print(number) Traceback (most recent call last): File "", line 1, in NameError: name 'number' is not defined >>> Don't worry.This is fine.You can just teach python what "number" is and try again.>>> number = 43 >>> print(number) 43 >>>