⇤ ← Revision 1 as of 2005-05-20 12:52:07
33
Comment: created
|
442
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 "What is the value of x?" x = float(raw_input()) print "What is the value of y?" y = float(raw_input()) print "The value of z is:" print hypot(x, y) 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()}}}