Pensieve header: September 29: Textbook (EIWL) chapters 5-8, unevaluated.

5. Operations on Lists

{1,2,3}+10

{1,1,2}*{1,2,3}

Range[10]^2

Sort[{4,2,1,3,6}]

Length[{5,3,4,5,3,4,5}]

Total[{1,1,2,2}]

Total[Range[10]]

Count[{a,b,a,a,c,b,a},a]

First[{7,6,5}]

Last[{7,6,5}]

Part[{7,6,5}, 2]

First[Sort[{6,7,1,2,4,5}]]

Min[{6,7,1,2,4,5}]

IntegerDigits[1988]

Last[IntegerDigits[1988]]

Take[{101,203,401,602,332,412},3]

Take[IntegerDigits[2^100],10]

Drop[{101,203,401,602,332,412},3]

6. Making Tables

Table[5,10]

Table[x,10]

Table[{1,2},10]

Table[PieChart[{1,1,1}],3]

Table[a[n],{n,5}]

Table[n+1,{n,10}]

Table[n^2,{n,10}]

Table[Range[n],{n,5}]

Table[Column[Range[n]],{n,8}]

Table[ListPlot[Range[10*n]],{n,3}]

Table[PieChart[Table[1,n]],{n,5}]

Table[2^expt,{expt,10}]

Table[{x,x+1,x^2},{x,5}]

Table[f[n],{n,10}]

Table[f[n],{n,4,10}]

Table[f[n],{n,4,10,2}]

Range[4,10]

Range[4,10,2]

f/@Range[4,10,2]

Range[0,1,0.1]

ListPlot[Table[x-x^2,{x,0,1,.02}]]

ListPlot[Range[0,1,.02]-Range[0,1,.02]^2]

Table[RandomInteger[10],20]

RandomInteger[10,20]

7. Colors and Styles

Red

{Red,Green,Blue,Purple,Orange,Black}

ColorNegate[Yellow]

Blend[{Yellow,Pink,Green}]

RGBColor[1,0,0]

Table[RGBColor[1,g,0],{g,0,1,0.05}]

Hue[0.5]

Table[Hue[u],{u,0,1,0.05}]

RandomColor[]

Table[RandomColor[],30]

Blend[Table[RandomColor[],20]]

Style[1000,Red]

Table[Style[RandomInteger[1000],RandomColor[]],30]

Style[x,30]

Table[Style[100,n],{n,30}]

Table[Style[x,RandomColor[],RandomInteger[30]],25]

8. Basic Graphics Objects

Graphics[Circle[]]

Graphics[Disk[]]

Graphics[RegularPolygon[5]]

Table[Graphics[RegularPolygon[n]],{n,5,10}]

Graphics[{Orange,RegularPolygon[5]}]

Graphics3D[Sphere[]]

{Graphics3D[Cone[]],Graphics3D[Cylinder[]]}

Graphics3D[Style[Sphere[],Yellow]]