下载Python:http://www.python.org
从IDLE启动Python,IDLE是一个Python的shell
Windows上用Alt+n返回上一条语句,Alt+p到下一条语句
mac系统上对应使用Ctrl+n和Ctrl+p
>>> print("hello world")#打印“hello world”
hello world
>>> print (5+3)
8
>>> 5+3
8
>>> 98765432123456789*1234567890987654321
121932631239140373304069513112635269L
>>> print("well water"+" river")
well water river
开平方根:
>>> import math
>>> math.sqrt(9)
3.0
>>>
开二次以上根号
>>> 625**(1./4)
5.0