Differences between revisions 2 and 3
Revision 2 as of 2005-05-20 12:57:59
Size: 442
Editor: squid
Comment: added HypotIO and Code sections
Revision 3 as of 2005-05-20 13:00:16
Size: 455
Editor: squid
Comment: changed Code section
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
print "HypotIO - Programmed by JAM" print "HypotIO - Written by JAM in Python 2.4.1"

HypotIO

This program creates an I/O interface for the hypot(x, y) function of the math module. It is very simple.

Code

{{{from math import hypot

print "HypotIO - Written by JAM in Python 2.4.1" print print "What is the value of x?" x = float(raw_input()) print print "What is the value of y?" y = float(raw_input()) print print "The value of z is:" print hypot(x, y) print print "Press Enter to quit." raw_input()}}}

JAM/Code/HypotIO (last edited 2008-11-15 14:00:13 by localhost)

Unable to edit the page? See the FrontPage for instructions.