Differences between revisions 1 and 2
Revision 1 as of 2005-05-20 12:52:07
Size: 33
Editor: squid
Comment: created
Revision 2 as of 2005-05-20 12:57:59
Size: 442
Editor: squid
Comment: added HypotIO and Code sections
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Describe JAM/Code/HypotIO here. = 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 - Programmed by JAM"
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()}}}

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 - Programmed by JAM" 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.