Recent Changes - Search:

Test

edit SideBar

Expressions

Python is interactive (show IDLE prompt)

Simple program: 3 + 2 Python computes: 5

built-in operators/functions: +, *, -, / pow, abs

pow(2,3)

for math functions need to do:

from math import *
sin(0)
cos(pi)
sqrt(9)

OR import math

math.sin(0)
math.cos(math.pi)
math.sqrt(9)

Combine and nest expressions:

sin(3 * pi / 2)
# sin(3pi/2) is an error
abs(sin(3 * pi / 2))
Edit - History - Print - Recent Changes - Search
Page last modified on August 06, 2010, at 01:48 PM