Tuesday, August 19, 2014

Basic Math in Python

After installing Python 2 Open IDLE (Python GUI). IDLE stands for

Integrated DeveLopment Environment.

Basic math functions are not complicated in IDLE. Just type 4+4 at the prompt and see
what happens. 

Interesting difference between 18/7 and 18.0/7. This illustrates the difference between an
integer and a Float.

How about 18%7? % gives you the remainder for the division function.

How would you write 8 to the third power? Try 8*8*8, or 8**3.

No comments:

Post a Comment