Differences between revisions 2 and 3
Revision 2 as of 2005-05-13 21:49:54
Size: 572
Editor: 209-132-174-53
Comment:
Revision 3 as of 2005-05-14 01:08:59
Size: 1598
Editor: 209-132-174-47
Comment:
Deletions are marked like this. Additions are marked like this.
Line 30: Line 30:

= Version 1.0 of Floor Calculator =

{{{from math import floor

print "Floor Calculator - Version 1.0"
print
print "What is the value of x?"
x = float(raw_input())
print
print "The floor of x is:"
print floor(x)
print
print "Press Enter to quit."
raw_input()}}}

= Version 1.0 of fmod Calculator =

{{{from math import fmod

print "fmod Calculator - Version 1.0"
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 result of fmod(x, y) is:"
print fmod(x, y)
print
print "Press Enter to quit."
raw_input()}}}

= Version 1.0 of Mantissa and Exponent Calculator =

{{{from math import frexp

print "Mantissa and Exponent Calculator - Version 1.0"
print
print "What is the value of x?"
x = float(raw_input())
y = frexp(x)
print
print "The mantissa of x is:"
print y[1]
print
print "The exponent of x is:"
print y[2]
print
print "Press enter to quit."
raw_input()}}}
----
CategoryCategory

Version 1.0 of Ceiling Calculator

{{{from math import ceil

print "Ceiling Calculator - Version 1.0" print print "What is the value of x?" x = float(raw_input()) print print "The ceiling of x is:" print ceil(x) print print "Press Enter to quit." raw_input()}}}

Version 1.0 of Absolute Value Calculator

{{{from math import fabs

print "Absolute Value - Version 1.0" print print "What is the value of x?" x = float(raw_input()) print print "The absolute value of x is:" print fabs(x) print print "Press Enter to quit." raw_input()}}}

Version 1.0 of Floor Calculator

{{{from math import floor

print "Floor Calculator - Version 1.0" print print "What is the value of x?" x = float(raw_input()) print print "The floor of x is:" print floor(x) print print "Press Enter to quit." raw_input()}}}

Version 1.0 of fmod Calculator

{{{from math import fmod

print "fmod Calculator - Version 1.0" 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 result of fmod(x, y) is:" print fmod(x, y) print print "Press Enter to quit." raw_input()}}}

Version 1.0 of Mantissa and Exponent Calculator

{{{from math import frexp

print "Mantissa and Exponent Calculator - Version 1.0" print print "What is the value of x?" x = float(raw_input()) y = frexp(x) print print "The mantissa of x is:" print y[1] print print "The exponent of x is:" print y[2] print print "Press enter to quit." raw_input()}}}


CategoryCategory

LeeEdwin/MathTools (last edited 2009-09-20 19:35:26 by techtonik)

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