CSCI-UA.0002-002

Home || Syllabus || Resources ||


Software || Python 2.x vs Python 3.x || Additional Python Resources


Software

Python Downloads - http://python.org/download/

Notes:

Notes on using Python's IDLE in Windows:

In order to set a default directory for your programs so that Python does not save them with the rest of Python, you can reconfigure the shortcut on your desktop to specify your own working directory. To do that, right-click on the shortcut on your desktop and choose Properties. In the "Start In:" line, enter your own folder, for example C:\PythonClass and then click OK.


Python 2.x vs Python 3.x

A summary of differences follows; this list will be expanded throughout the semester to reflect the differences you will see in the optional textbook:

Topic Python 2.x as seen in the "How To Think ..." book Python 3.x as seen in class
Print statement print 'Hello, World!' print('Hello, World')
Data entry: text name = raw_input('What is your name? ') name = input('What is your name? ')
Data entry: numbers (values) age = input('What is your age? ') age = input('What is your age? ')
age = int(age)
Integer arithmetic: division >>> 7/2
3
>>> 7/2
3.5
>>> 7//2
3

 


Additional Python Resources and notes:

Safari Online at the Bobst -

Outside Online Resources:

Class Resources:


Email: nathan