Pensieve header: Sep 15: Textbook (EIWL) chapters 1-4.

1. Starting Out: Elementary Arithmetic

2+2

1234+5678

1234*5678

2/3 + 1/4

1000!

Log[100!]

N[Log[100!]]

N[Log[100!],300]

Zeta[1+1I]

N[Zeta[1+I]]

Zeta[1+1I] // N

N@Zeta[1+1I]

2. Introducing Functions (should have been “Expressions”)

leonard asked about cells

leonrad asked about cells

Plus[3,4]

Plus[1,2,3]

Times[2,3]

Times[2,Plus[2,3]]

2(2+3)

Max[2,7,3]

RandomInteger[100]

100//Factorial//Log//N

Hold[1+1]

Hold[100//Factorial//Log//N]

TreeForm[1+1]

Hold[1+1] // TreeForm

Hold[1+1] // TreeForm  // FullForm

f[1,g[2,3]]

f[1,g[2,3]] // TreeForm

3. First Look at Lists

{1,2,3,4,a,b,c}

l={1,2,3,2,1}

l//TreeForm

List[1,2,3]

ListPlot[{1,1,2,2,3,4,4}]

ListPlot[{1,1,2,2,3,4,4}] // FullForm

Graphics[List[List[],List[List[List[],List[Hue[1,0,0],Directive[PointSize[0.1],RGBColor[0.368417`,0.506779`,0.709798`],AbsoluteThickness[1.6`]],Point[List[List[1.`,1.`],List[2.`,1.`],List[3.`,2.`],List[4.`,2.`],List[5.`,3.`],List[6.`,4.`],List[7.`,4.`]]]],List[]]],List[],List[],List[List[],List[]],List[List[],List[]]],List[Rule[DisplayFunction,Identity],Rule[PlotRangePadding,List[List[Scaled[0.02`],Scaled[0.02`]],List[Scaled[0.02`],Scaled[0.05`]]]],Rule[AxesOrigin,List[0.`,0]],Rule[PlotRange,List[List[0.`,7.`],List[0,4.`]]],Rule[PlotRangeClipping,True],Rule[ImagePadding,All],Rule[DisplayFunction,Identity],Rule[AspectRatio,Power[GoldenRatio,-1]],Rule[Axes,List[True,True]],Rule[AxesLabel,List[None,None]],Rule[AxesOrigin,List[0.`,0]],RuleDelayed[DisplayFunction,Identity],Rule[Frame,List[List[False,False],List[False,False]]],Rule[FrameLabel,List[List[None,None],List[None,None]]],Rule[FrameTicks,List[List[Automatic,Automatic],List[Automatic,Automatic]]],Rule[GridLines,List[None,None]],Rule[GridLinesStyle,Directive[GrayLevel[0.5`,0.4`]]],Rule[Method,List[Rule["CoordinatesToolOptions",List[Rule["DisplayFunction",Function[List[Function[Identity[Slot[1]]][Part[Slot[1],1]],Function[Identity[Slot[1]]][Part[Slot[1],2]]]]],Rule["CopiedValueFunction",Function[List[Function[Identity[Slot[1]]][Part[Slot[1],1]],Function[Identity[Slot[1]]][Part[Slot[1],2]]]]]]]]],Rule[PlotRange,List[List[0.`,7.`],List[0,4.`]]],Rule[PlotRangeClipping,True],Rule[PlotRangePadding,List[List[Scaled[0.02`],Scaled[0.02`]],List[Scaled[0.02`],Scaled[0.05`]]]],Rule[Ticks,List[Automatic,Automatic]]]]

?ListPlot

Range[10]

ListPlot[Range[10]]

ListPlot[Range[10], PlotLabel ->"a plot of range 10"]

ListPlot[Range[20]]

Reverse[{1,2,3,4}]

Reverse[Range[10]]

ListPlot[Reverse[Range[10]]]

Join[f[1,2], f[π, E], f[I,I,7]]

Join[{1,2,3},{4,5},{6,7}]

ListPlot[Join[Range[20],Range[20],Range[30]]]

ListPlot[Join[Range[20],Reverse[Range[20]],Range[30]]]

4. Displaying Lists

ListLinePlot[{1,3,5,4,1,2,1,4}]

ListPlot[{1,3,5,4,1,2,1,4}]

BarChart[{1,3,5,4,1,2,1,4}]

PieChart[{1,3,5,4}]

NumberLinePlot[{1,7,11,25}]

Column[{100,350,502,400}]

{PieChart[Range[3]],PieChart[Range[5]]}

{BarChart[{1,1,4,2}],BarChart[{5,1,1,0}],BarChart[{1,3,2,4}]}