|
Creating Python ProgramsPage Contents (hide) Python has two modes for executing programs. The first is the “normal” or interpreted mode in which a Python script or source file is executed via an interpretor. The interactive mode provides a command shell for entering and executing single statments or small segments of code. Normal ModePython is an interpreted language and was originally designed for scripting tasks. A Python program is commonly constructed by using a text editor or Python IDE to create a text file containing the instructions. The text file or source file, which should have a Assume the following program was created and stored in the text file name = raw_input( "What is your name? " ) print 'Hello ' + name To execute the program, enter python hello.py Interactive Mode | |
© 2006 - 2008: Rance Necaise - Page last
modified on August 04, 2006, at 04:32 PM
|