Built-in Numeric Tools,built-innumeric,import math
Built-in Numeric Tools,built-innumeric,import math
import math print math.pi, math.e # Common constantsprint math.sin(2 * math.pi / 180) # Sine, tangent, cosineprint math.sqrt(144), math.sqrt(2) # Square rootprint abs(-42), 2**4, pow(2, 4) print int(2.567), round(2.567), round(2.567, 2) # Truncate, round
- Draw shape border,drawshapeborder,from Tkinter
- List indices start at 0, and lists can be sliced, concat
- If statement: a dictionary-based 'switch'
- Iterating Over Lines with readlines,iteratingreadlines
- if Statements: if, elif and else,statementselif,x = in
- Loop through a list: for in,loopthrough,a = ['cat',
热门文章:
相关内容
- Draw shape border,drawshapeborder,from Tkinter
- List indices start at 0, and lists can be sliced, concatenated:,,a
- If statement: a dictionary-based 'switch',,choice =
- Iterating Over Lines with readlines,iteratingreadlines,f = open('fi
- if Statements: if, elif and else,statementselif,x = int(raw_
- Loop through a list: for in,loopthrough,a = ['cat',
- Generate binary message catalog from textual translation description,
- Change dictionary entry,dictionaryentry,d2 = {'spam'
- Concantenate a string by '\',concantenatestring,bar
- Write Unicode strings directly to flout,stringsflout,import codec
评论关闭