Create an Exercises Directory. Create a directory (or folder) for keeping your various exercise scripts. Be sure it is not in the same directory in which you installed Python.
Use IDLE's Shell Window. Start IDLE. Refer back to the exercises in the section called “Command-Line Interaction”. Run these exercises using IDLE.
Use IDLE's File Window. Start IDLE. Note the version number. Use under the menu to create a simple file. The file should have the following content.
""" My First File """ print __doc__
Save this file in your exercises directory; be sure the name
ends with .py. Run your file with the
menu item in the
menu, usually F5.
Simple Script. Create a Python file with the following three commands, each one on a separate line: copyright, license, credits.
Print Script. Create and run Python file with commands like the following examples: print 12345 + 23456; print 98765 - 12345; print 128 * 256; print 22 / 7.
Another Simple Print Script. Create and run a Python file with commands like the
following examples: print "one red", 18.0/38.0;
print "two reds in a row",(18.0/38.0)**2.
Numeric Types. Compare the results of 22/7 and 22.0/7. Explain the differences in the output.