HyperMath

Using Numbers

Using Numbers

Previous topic Next topic No expanding text in this topic  

Using Numbers

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

You can enter numbers and evaluate simple calculations.  HyperMath can also understand exponent types for expressing numbers in the form <value> * 10 ^ <exponent>.

>  print(1.2345e6)

1234500

 

> print(543.21E8)

54321000000

 

> print(2.56e-4)

0.000256

You can assign numbers to variables and perform arithmetic:

> width = 7.5

> height = 12.7

> print("The area of rectangle is", width * height)

The area of rectangle is 95.25

 

> depth = 2.8

> area = width * height

> volume = area * depth

> print("The area & volume are:",area, volume)

95.25   266.7