(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 29480, 887] NotebookOptionsPosition[ 25834, 771] NotebookOutlinePosition[ 26191, 787] CellTagsIndexPosition[ 26148, 784] WindowFrame->Normal ContainsDynamic->False*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Lesson 2 - Working with Cells and Notebooks", "Section", CellChangeTimes->{{3.460049885048273*^9, 3.460049888247829*^9}, { 3.460061786073359*^9, 3.460061799842352*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "Asking ", StyleBox["Mathematica", FontSlant->"Italic"], " for Help" }], "Subsection"], Cell[TextData[{ "Each built-in function has a description on how to use it. This can be \ accessed by typing ", StyleBox["?", "Input"], ", followed by the function name. Be careful to use the correct spelling and \ capitalization, as ", StyleBox["Mathematica", FontSlant->"Italic"], " distinguishes between upper and lower case letters. For example, to find \ out how to use the square root function, type" }], "Text"], Cell[BoxData[ RowBox[{"?", "Sqrt"}]], "Input"], Cell["\<\ This description tells us that we need one input, namely the expression of \ which we want the square root. Here is what happens if you were not careful \ about capitalization:\ \>", "Text"], Cell[BoxData[ RowBox[{"?", "sqrt"}]], "Input"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " will produce an error message, indicating that there is no such function." }], "Text"], Cell[TextData[{ "You can also use the wild card character", StyleBox[" ", FontWeight->"Bold"], StyleBox["*", "Input", FontWeight->"Bold"], " to find all commands that contain a certain name. For example, if you want \ to find out about plotting a function, you may guess that the function name \ contains the word ", StyleBox["Plot", "Input"], ". To find all commands with ", StyleBox["Plot", "Input"], " somewhere within the name, use" }], "Text", CellChangeTimes->{{3.460049986761221*^9, 3.460049992368409*^9}}], Cell[BoxData[ RowBox[{"?", "*Plot*"}]], "Input"], Cell[TextData[{ "The following gives all the function names that start with ", StyleBox["Plot", "Input"], "." }], "Text", CellChangeTimes->{{3.460214152890246*^9, 3.460214156454996*^9}}], Cell[BoxData[ RowBox[{"?", "Plot*"}]], "Input"], Cell["\<\ Once you have seen the list, you can then look at the function(s) that \ look(s) most promising to get a detailed description.\ \>", "Text"], Cell[BoxData[ RowBox[{"?", "Plot3D"}]], "Input"], Cell[TextData[{ "To use this mechanism well, keep in mind the convention of ", StyleBox["Mathematica", FontSlant->"Italic"], "' s function names: They start with capital letters and are usually spelled \ out completely (unless there are standard abbreviations such as ", StyleBox["Sqrt", "Input"], ", ", StyleBox["Sin", "Input"], ", ", StyleBox["Cos", "Input"], "). Each new word within the name is also capitalized." }], "Text", CellChangeTimes->{{3.460050072193262*^9, 3.460050078128319*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Documentation Center", "Subsection", CellChangeTimes->{{3.414941986396476*^9, 3.4149421091079597`*^9}, { 3.4149421531256104`*^9, 3.414942179364129*^9}, {3.414942245393763*^9, 3.4149422945575457`*^9}, {3.414942331801387*^9, 3.414942392986071*^9}, { 3.4149424390409317`*^9, 3.414942601097391*^9}, {3.414942835024214*^9, 3.414943053448613*^9}, {3.4155302440124817`*^9, 3.4155302489453573`*^9}, { 3.415530495165435*^9, 3.4155304958862877`*^9}, {3.4474161436638403`*^9, 3.4474161440155287`*^9}, {3.459644644100906*^9, 3.459644651734922*^9}}], Cell[TextData[{ "In previous versions of ", StyleBox["Mathematica", FontSlant->"Italic"], ", there was a book that listed all the ", StyleBox["Mathematica", FontSlant->"Italic"], " functions. In version 6.0, the printed version no longer exists, only an \ online version - the Documentation Center\nThis can be accessed in many ways: \ \n* By selecting ", StyleBox["Help", "Input", FontWeight->"Bold"], StyleBox["\[Rule]", "Input"], StyleBox["Documentation Center", "Input", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold"], "when ", StyleBox["Mathematica", FontSlant->"Italic"], " ", "is running.\n* By going to ", ButtonBox["http:// reference.wolfram.com/mathematica/guide/Mathematica.html \ ", BaseStyle->"Hyperlink", ButtonData:>{ URL["http://reference.wolfram.com/mathematica/guide/Mathematica.html"], None}], "on the web.\n* By clicking on the ", StyleBox[">>", "Input"], " symbol at the end of an error message or the usage information obtained \ using the ", StyleBox["?", "Input"], ".\nThe page that opens groups ", StyleBox["Mathematica", FontSlant->"Italic"], " functionality by topics, but there is also a link to an alphabetic index \ of functions. When choosing a topic, you typically will get a list of \ functions related to the topic, which then can be further explored. In \ addition, most pages will also have tutorials. \n\nAnother cool feature of ", StyleBox["Mathematica", FontSlant->"Italic"], " are the demonstrations. They can be accessed via ", StyleBox["Help", "Input", FontWeight->"Bold"], StyleBox[" \[Rule] ", "Input"], StyleBox["Demonstrations...", "Input", FontWeight->"Bold"], ", and often there are links in the documentation for a specific function as \ well. " }], "Text", CellChangeTimes->{{3.414941986396476*^9, 3.4149421091079597`*^9}, { 3.4149421531256104`*^9, 3.414942179364129*^9}, {3.414942245393763*^9, 3.4149422945575457`*^9}, {3.414942331801387*^9, 3.414942392986071*^9}, { 3.4149424390409317`*^9, 3.414942601097391*^9}, {3.414942835024214*^9, 3.4149430317017384`*^9}, {3.415530095176269*^9, 3.415530199017433*^9}, { 3.459644659914192*^9, 3.459644660244934*^9}, {3.460050293057139*^9, 3.460050386844479*^9}, {3.4600504169727697`*^9, 3.4600505359292593`*^9}, { 3.460050602405149*^9, 3.46005069193622*^9}, {3.460050771648864*^9, 3.460050777099317*^9}, {3.460050849837421*^9, 3.460050859944407*^9}, 3.4600510413259*^9, {3.4600522602652397`*^9, 3.460052261769186*^9}}], Cell[TextData[{ "WARNING: ", StyleBox["Mathematica", FontSlant->"Italic"], " is an enormous and powerful software package. It is not possible to cover \ all possible topics in these few lessons. Therefore you will need to know how \ to find out information on ", StyleBox["Mathematica", FontSlant->"Italic"], " on-line. Finding your way around the Documentation Center is an important \ skill- a skill that will be tested in upcoming homework, quizzes and exams." }], "Text", CellChangeTimes->{{3.460050882594302*^9, 3.4600510228136377`*^9}, { 3.460051063902541*^9, 3.460051117373026*^9}, 3.460574259452804*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Practice", "Subsection", CellFrame->{{0, 0}, {0, 2}}, CellChangeTimes->{{3.460051127767828*^9, 3.460051129764793*^9}}], Cell[TextData[{ "1) Does ", StyleBox["Mathematica", FontSlant->"Italic"], " have a built-in factorial function? What is the syntax? Calculate 100 \ factorial. Calculate 1/2 factorial." }], "Text", CellChangeTimes->{{3.460051135619762*^9, 3.460051207356595*^9}, { 3.4600513365707417`*^9, 3.46005135672437*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["The Different Types of Cells", "Subsection", CellFrame->{{0, 0}, {0, 2}}], Cell[TextData[{ "You have already noticed that there are at least three different types of \ cells in this notebook: Cells containing text (such as this one), cells \ containing input for ", StyleBox["Mathematica, ", FontSlant->"Italic"], "and", StyleBox[" ", FontSlant->"Italic"], "cells containing output from ", StyleBox["Mathematica.", FontSlant->"Italic"], " These three cell styles are called ", StyleBox["Text", "Input"], ", ", StyleBox["Input", "Input"], " and ", StyleBox["Output", "Input"], ". Whenever you open a new cell, and the cell bracket appears at the right \ side of the screen, it is by default an ", StyleBox["Input", "Input", FontWeight->"Bold"], " cell. To check this, type any sentence into your notebook." }], "Text", CellChangeTimes->{{3.4600517206030703`*^9, 3.4600519333941727`*^9}, { 3.4600519846863327`*^9, 3.460052183753294*^9}, {3.460052701077544*^9, 3.460052705145729*^9}}], Cell[BoxData[ RowBox[{"This", " ", "is", " ", "a", " ", "test"}]], "Input"], Cell[TextData[{ "Click on the cell bracket to select it, go to the ", StyleBox["Format\[Rule]Style", "Input"], " menu, and you will see a check mark next to ", StyleBox["Input", "Input"], " indicating that the cell has that style. You will notice that the font is \ Courier bold. This is the default for ", StyleBox["Input", "Input"], " cells. To change the cell to a ", StyleBox["Text", "Input", FontWeight->"Bold"], " cell, click on the cell bracket, which will now be highlighted. Select ", StyleBox["Format\[Rule]Style\[Rule]Text", "Input", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold"], "(shortcut- ", StyleBox["\[AltKey]-7", "Input"], " (Windows) or ", StyleBox["\[CloverLeaf]-7", "Input"], " (Mac)). Now your sentence should look like this:" }], "Text", CellChangeTimes->{{3.460051681284882*^9, 3.4600517083313227`*^9}, { 3.46005219389007*^9, 3.460052242297017*^9}, {3.460052279204092*^9, 3.460052354258049*^9}}], Cell["This is a test", "Text"], Cell[TextData[{ "You should change any cells containing comments and explanations into text \ cells to avoid having ", StyleBox["Mathematica", FontSlant->"Italic"], " try to evaluate them. Here is an example of what happens if you do not do \ this:" }], "Text"], Cell[BoxData[ RowBox[{"Silvia", " ", "Heubach"}]], "Input"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " will think that you had two variables, named ", StyleBox["Silvia", "Input", FontWeight->"Bold"], " and ", StyleBox["Heubach", "Input", FontWeight->"Bold"], ", which are to be multiplied (", StyleBox["Mathematica", FontSlant->"Italic"], " orders the variables in a product in alphabetical order). Therefore, \ always separate text and input by putting them into different cells and \ applying one of the styles 1 - 8 to the cells containing text. " }], "Text"], Cell[TextData[{ "To open a new cell in text style, you can select ", StyleBox["Format\[Rule]Style\[Rule]Text", "Input", FontWeight->"Bold"], " (shortcut - ", StyleBox["\[AltKey] - 7", "Input"], " (Windows) or ", StyleBox["\[CloverLeaf] - 7", "Input"], " (Mac)) after opening the cell, but before typing in any text." }], "Text", CellChangeTimes->{{3.4600524738275347`*^9, 3.4600525550498743`*^9}, { 3.460052586807797*^9, 3.460052616081036*^9}}], Cell["\<\ There are many other styles available for cells, and many ways of customizing \ each of these styles - too many to discuss here.\ \>", "Text", CellChangeTimes->{{3.4600526337349033`*^9, 3.460052674984571*^9}, { 3.460052728329505*^9, 3.4600527484243298`*^9}, {3.460061676228455*^9, 3.460061677043682*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Cutting, Pasting, Deleting, etc.", "Subsection", CellChangeTimes->{{3.4602142277434063`*^9, 3.460214249091014*^9}}], Cell[TextData[{ "Sometimes when working with ", StyleBox["Mathematica", FontSlant->"Italic"], ", you may want to rearrange the order of cells, copy cells, or cut them out \ (for example, incorrect computations). Any of these tasks can be accomplished \ in the same manner as in any word processing program. For example, to copy \ the text cell that was modified above, first select the cell by clicking on \ its bracket (or highlight the part of the content that you'd like to move). \ Then choose ", StyleBox["Edit\[Rule]Copy", "Input", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold"], "(or \[ControlKey]-C)", StyleBox[" ", FontWeight->"Bold"], "or and move the cursor to the place in the notebook where you would like to \ place a copy of the cell. Click at that location, then use", StyleBox[" ", "Input"], StyleBox["Edit\[Rule]Paste", "Input", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold"], "(or \[ControlKey]-V). As always, you may use the shortcuts indicated in the \ menu instead. To delete a cell or part of a cell, use ", StyleBox["Edit\[Rule]Cut", "Input", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold"], "(or the \[DeleteKey] key) after selecting the cell or highlighting the \ selection. Similarly, you can select just part of the text in a cell, \ highlight it and then copy, cut and paste." }], "Text", CellChangeTimes->{{3.460052767969154*^9, 3.4600527877389727`*^9}, { 3.460061548119832*^9, 3.460061621457828*^9}, 3.460061662415081*^9}], Cell[TextData[{ StyleBox["%", "Input"], " is a convenient abbreviation for the previous output generated by ", StyleBox["Mathematica", FontSlant->"Italic"], ". For example:" }], "Text", CellChangeTimes->{{3.459965040693371*^9, 3.459965123705731*^9}, { 3.459965186094982*^9, 3.45996518993617*^9}, 3.4602197328677387`*^9}], Cell[BoxData[ RowBox[{"37", "^", RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}]}]], "Input", CellChangeTimes->{{3.4599651391688843`*^9, 3.459965144153261*^9}}], Cell[BoxData[ RowBox[{"N", "[", "%", "]"}]], "Input", CellChangeTimes->{{3.459965149600287*^9, 3.4599651514643373`*^9}}], Cell[BoxData[ RowBox[{"%", "+", "4"}]], "Input", CellChangeTimes->{{3.4599652005172873`*^9, 3.4599652071433077`*^9}}], Cell[TextData[{ "However, you should use ", StyleBox["%", "Input"], " sparingly, as it always refers to the previous output, which is not \ necessarily the output that is just above the current cell. If there is a \ quantity to which you want to refer in the future, it is safer to assign a \ name to that quantity. \n\nYou can also use ", StyleBox["%%", "Input"], " for the second to last output, and ", StyleBox["%5", "Input"], " (or ", StyleBox["Out[5]", "Input"], ") for the result labeled ", StyleBox["Out[5]", "Input"], ". " }], "Text", CellChangeTimes->{{3.459965040693371*^9, 3.459965123705731*^9}, { 3.459965260690997*^9, 3.459965268429111*^9}, {3.459965299112204*^9, 3.4599654263264103`*^9}, 3.459965497884313*^9, {3.4602149643551197`*^9, 3.460214972308111*^9}}], Cell[BoxData[ RowBox[{"Out", "[", "5", "]"}]], "Input", CellChangeTimes->{{3.45996544396701*^9, 3.459965452937133*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Out", "[", "5", "]"}], "*", RowBox[{"Out", "[", "6", "]"}]}]], "Input", CellChangeTimes->{{3.459965519605215*^9, 3.4599655305880737`*^9}}], Cell[TextData[{ "Two other really convenient shortcuts are ", StyleBox["Input from Above", "Input"], " and ", StyleBox["Output from Above", "Input"], ". These are in the ", StyleBox["Insert", "Input"], " menu, but are more easily used using the shortcuts \[ControlKey]-L and \ \[ShiftKey]\[ControlKey]-L. They take the input or output from the most \ recent command and paste it where the cursor is. " }], "Text", CellChangeTimes->{{3.460214330402782*^9, 3.460214348214694*^9}, { 3.460214383402156*^9, 3.4602144945471563`*^9}, {3.460214573198318*^9, 3.460214609691001*^9}, {3.46021465383471*^9, 3.460214733274439*^9}, 3.460214883165749*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Practice", "Subsection", CellFrame->{{0, 0}, {0, 2}}, CellChangeTimes->{{3.4602149138914623`*^9, 3.460214916055336*^9}}], Cell[TextData[{ "1) Repeat the easy example above involving ", StyleBox["37^(1/2)", "Input"], " using ", StyleBox["Input from Above", "Input"], " and/or ", StyleBox["Output from Above", "Input"], " instead of ", StyleBox["%", "Input"], "." }], "Text", CellChangeTimes->{{3.4602150115413923`*^9, 3.4602150660038643`*^9}, { 3.4602151544179792`*^9, 3.460215165058152*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Entering Mathematical Notation", "Subsection", CellFrame->{{0, 0}, {0, 2}}, CellChangeTimes->{{3.460565899971663*^9, 3.46056592122577*^9}}], Cell["\<\ Through it is not necessary to do so, it is sometimes useful to input complex \ mathematical expressions using conventional notation. For example, instead of\ \ \>", "Text", CellChangeTimes->{{3.460565932508355*^9, 3.460566071496779*^9}, 3.460566107174397*^9, 3.46056614883292*^9}], Cell[BoxData[ RowBox[{"x", "^", "4"}]], "Input", CellChangeTimes->{{3.460566110337113*^9, 3.460566111386511*^9}}], Cell["we might prefer", "Text", CellChangeTimes->{{3.460565932508355*^9, 3.460566071496779*^9}, { 3.460566119417033*^9, 3.460566125325053*^9}}], Cell[BoxData[ SuperscriptBox["x", "4"]], "Input", CellChangeTimes->{{3.46056608010213*^9, 3.460566081722641*^9}}], Cell[TextData[{ " ", StyleBox["Mathematica", FontSlant->"Italic"], " provides several ways of doing this. One method is to use the ", StyleBox["BasicMathInput", "Input", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold"], "palette from the ", StyleBox["Palettes", "Input", FontWeight->"Bold"], " menu. Clicking on the exponent template on this palette inserts the \ template where the cursor is." }], "Text", CellChangeTimes->{{3.4605661345116663`*^9, 3.46056613715475*^9}, { 3.460566193936009*^9, 3.460566242236887*^9}, {3.460566274999135*^9, 3.460566366509861*^9}, {3.4605664137845707`*^9, 3.460566469726696*^9}}], Cell[BoxData[ SuperscriptBox["\[Placeholder]", "\[Placeholder]"]], "Input"], Cell[TextData[{ "A black placeholder indicates the location where the keyboard input will be \ placed. You can now type ", StyleBox["x", "Input"], ". Pressing the right arrow key (or ", "\[TabKey])", " moves the place holder to the exponent, and then you can type ", StyleBox["4", "Input"], "." }], "Text", CellChangeTimes->{{3.460566501236491*^9, 3.460566570478633*^9}, { 3.460566795392063*^9, 3.46056681922329*^9}}], Cell["\<\ Similar templates can be used to enter fractions, square roots, integrals, \ derivatives, greek letters and much more. In each template, the arrow keys \ are used to navigate.\ \>", "Text", CellChangeTimes->{{3.4149442486300583`*^9, 3.4149442510587263`*^9}, { 3.415531168945941*^9, 3.4155311925444107`*^9}, {3.4155327517930202`*^9, 3.415532770484756*^9}, {3.447417085987891*^9, 3.447417107800218*^9}, { 3.447417142954422*^9, 3.447417251471485*^9}, 3.460566316428701*^9, { 3.460566372038191*^9, 3.460566401146966*^9}, {3.460566620657976*^9, 3.460566714479759*^9}, {3.460566784256531*^9, 3.460566784951598*^9}}], Cell[TextData[{ "Each template has a corresponding keyboard shortcut. The shortcut for the \ exponent template is \[ControlKey]^. Open a new cell and type ", StyleBox["x\[ControlKey]^4", "Input"], " to see how this works. The shortcut for the fraction template is ", StyleBox["\[ControlKey]/", "Input"], ". Try typing ", StyleBox["2\[ControlKey]/3", "Input"], "." }], "Text", CellChangeTimes->{{3.460566945132516*^9, 3.4605671332763987`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Practice", "Subsection", CellFrame->{{0, 0}, {0, 2}}, CellChangeTimes->{{3.4605668424384947`*^9, 3.460566844021522*^9}}], Cell["\<\ 1) Enter the following using the palettes or shortcuts (What happens if these \ cells are evaluated?):\ \>", "Text", CellChangeTimes->{{3.460566849522271*^9, 3.460566850189631*^9}, { 3.4605668911855*^9, 3.4605669088440447`*^9}, 3.460567159088112*^9, { 3.4605673164827127`*^9, 3.460567344867944*^9}}], Cell[BoxData[ FractionBox[ RowBox[{ SuperscriptBox["x", "4"], "-", RowBox[{"4", "x"}]}], RowBox[{ SuperscriptBox["x", "3"], "-", RowBox[{"2", "x"}]}]]], "Input", CellChangeTimes->{{3.460567166370225*^9, 3.460567167104619*^9}}], Cell[BoxData[ RowBox[{ SubsuperscriptBox["\[Integral]", "1", "2"], RowBox[{ SqrtBox["x"], RowBox[{"\[DifferentialD]", "x"}]}]}]], "Input", CellChangeTimes->{{3.460567246453075*^9, 3.460567260900647*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Syntax Checking", "Subsection", CellFrame->{{0, 0}, {0, 2}}, CellChangeTimes->{{3.4149445778405247`*^9, 3.41494458041721*^9}, { 3.415530567620945*^9, 3.415530570632083*^9}, {3.415533878237699*^9, 3.415533882704636*^9}, 3.447416740789565*^9}], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " 6.0 checks for syntax errors. For example, it checks whether all the \ brackets, parentheses and curly braces match. As you type a function" }], "Text", CellChangeTimes->{{3.41494458772966*^9, 3.414944631905375*^9}}], Cell[BoxData[ RowBox[{"N", "["}]], "Input", CellChangeTimes->{{3.414944635926367*^9, 3.4149446370181913`*^9}, 3.460228338092308*^9}], Cell["\<\ you notive that the square brackets appears in light pink. This means that \ its matching partner is missing. Continuing to type, notice that the color \ changes to black as soon as a match is detected. \ \>", "Text", CellChangeTimes->{{3.41494464090237*^9, 3.414944729215735*^9}}], Cell[BoxData[ RowBox[{"N", "[", RowBox[{"Sin", "[", "1", "]"}]}]], "Input", CellChangeTimes->{{3.414944668211527*^9, 3.414944679772098*^9}, 3.4149447108069687`*^9, {3.460228349218006*^9, 3.460228377739402*^9}}], Cell["\<\ This allows for detection on simple mismatches. For example, if I \ accidentally type a parenthesis instead of a bracket to complete, I will see \ two pink unmatched items.\ \>", "Text", CellChangeTimes->{{3.4149447343710003`*^9, 3.414944802450882*^9}, { 3.4602283937137127`*^9, 3.4602283966704473`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"N", "[", RowBox[{"Sin", "[", "1"}]}], "}"}]], "Input", CellChangeTimes->{{3.414944668211527*^9, 3.414944679772098*^9}, 3.4149447108069687`*^9, {3.414944795740095*^9, 3.4149447979607973`*^9}, { 3.460228407852852*^9, 3.46022841317682*^9}}], Cell[TextData[{ "Another useful feature is that variables that have a value are black, those \ without a value are blue. For example, all built-in ", StyleBox["Mathematica", FontSlant->"Italic"], " functions show up in black, while user-defined variables are initially \ blue. This can help detect typos of not capitalizing a ", StyleBox["Mathematica", FontSlant->"Italic"], " function, or a typo with either a user-defined variable name or a ", StyleBox["Mathematica", FontSlant->"Italic"], " function." }], "Text", CellChangeTimes->{{3.4149448160847816`*^9, 3.414944856033551*^9}, { 3.414944898971137*^9, 3.414944963878662*^9}, 3.448022427826852*^9, { 3.460228567690372*^9, 3.4602286663050547`*^9}}], Cell[TextData[{ "After the ", StyleBox["Clear", "Input"], " function is evaluated ", StyleBox["aaa", "Input"], " appears in blue in the next line and anywhere else in the notebook. After \ ", StyleBox["aaa=6", "Input"], " is evaluated, aaa is black." }], "Text", CellChangeTimes->{{3.4602287434809637`*^9, 3.460228870334362*^9}}], Cell[BoxData[ RowBox[{"Clear", "[", "aaa", "]"}]], "Input", CellChangeTimes->{{3.460228677105937*^9, 3.460228680850506*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"aaa", " ", "+", "4"}]], "Input", CellChangeTimes->{{3.460228687514996*^9, 3.460228693795507*^9}}], Cell[BoxData[ RowBox[{"4", "+", "aaa"}]], "Output", CellChangeTimes->{3.4602286972354193`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"aaa", "=", "6"}]], "Input", CellChangeTimes->{{3.414944967926736*^9, 3.414944972452031*^9}, { 3.460228705947172*^9, 3.460228708760741*^9}}], Cell[BoxData["6"], "Output", CellChangeTimes->{3.460228710332199*^9}] }, Open ]], Cell["Pretty nifty!", "Text", CellChangeTimes->{{3.414944989574717*^9, 3.4149449933949327`*^9}, 3.460228726983086*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Homework", "Subsection", CellFrame->{{0, 0}, {0, 2}}, CellChangeTimes->{{3.463230675915111*^9, 3.4632306794706173`*^9}}], Cell[TextData[{ "Find out what you can about random numbers in ", StyleBox["Mathematica", FontSlant->"Italic"], ". Starting with the following questions:" }], "Text", CellChangeTimes->{{3.463230685795549*^9, 3.463230737303554*^9}, { 3.463230817505023*^9, 3.4632308213529873`*^9}}], Cell[TextData[{ "1) Find all ", StyleBox["Mathematica", FontSlant->"Italic"], " function names that contain ", StyleBox["Random", "Input"], "." }], "Text", CellChangeTimes->{{3.463230742354185*^9, 3.4632307430635138`*^9}, { 3.463230785384301*^9, 3.463230830352964*^9}}], Cell[TextData[{ "2) Find a ", StyleBox["Mathematica", FontSlant->"Italic"], " function that generates one random integer between 1 and 6", StyleBox[".", "Subsubsection"] }], "Text", CellChangeTimes->{{3.463230884354501*^9, 3.463230951418915*^9}, 3.463231170159836*^9}], Cell[TextData[{ "3) Find a ", StyleBox["Mathematica", FontSlant->"Italic"], " function that generates one random real number (that is, a decimal \ approximation of a real number) between 1 and 6." }], "Text", CellChangeTimes->{{3.463231042414403*^9, 3.4632311045806713`*^9}}], Cell[TextData[{ "4) Find a ", StyleBox["Mathematica", FontSlant->"Italic"], " function that generates a list of 20 random integers between 1 and 6. The \ output might look like" }], "Text", CellChangeTimes->{{3.463231182123507*^9, 3.463231228246002*^9}, { 3.46323126222418*^9, 3.463231302647208*^9}}], Cell[BoxData[ RowBox[{"{", RowBox[{ "6", ",", "5", ",", "3", ",", "1", ",", "2", ",", "6", ",", "2", ",", "6", ",", "6", ",", "6", ",", "1", ",", "3", ",", "1", ",", "5", ",", "4", ",", "1", ",", "2", ",", "5", ",", "1", ",", "4"}], "}"}]], "Output", CellChangeTimes->{{3.463231318822317*^9, 3.463231334005512*^9}}, FontSlant->"Italic"] }, Open ]] }, Open ]] }, WindowSize->{948, 876}, WindowMargins->{{25, Automatic}, {Automatic, 0}}, ShowSelection->True, FrontEndVersion->"6.0 for Mac OS X x86 (32-bit) (April 20, 2007)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[590, 23, 177, 2, 67, "Section"], Cell[CellGroupData[{ Cell[792, 29, 107, 5, 34, "Subsection"], Cell[902, 36, 425, 10, 41, "Text"], Cell[1330, 48, 47, 1, 27, "Input"], Cell[1380, 51, 200, 4, 26, "Text"], Cell[1583, 57, 47, 1, 27, "Input"], Cell[1633, 60, 154, 4, 26, "Text"], Cell[1790, 66, 526, 14, 41, "Text"], Cell[2319, 82, 49, 1, 27, "Input"], Cell[2371, 85, 190, 5, 26, "Text"], Cell[2564, 92, 48, 1, 27, "Input"], Cell[2615, 95, 150, 3, 26, "Text"], Cell[2768, 100, 49, 1, 27, "Input"], Cell[2820, 103, 506, 13, 41, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[3363, 121, 558, 7, 34, "Subsection"], Cell[3924, 130, 2511, 60, 176, "Text"], Cell[6438, 192, 624, 13, 56, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[7099, 210, 126, 2, 44, "Subsection"], Cell[7228, 214, 317, 8, 26, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[7582, 227, 80, 1, 44, "Subsection"], Cell[7665, 230, 937, 26, 56, "Text"], Cell[8605, 258, 76, 1, 27, "Input"], Cell[8684, 261, 958, 24, 56, "Text"], Cell[9645, 287, 30, 0, 26, "Text"], Cell[9678, 289, 266, 7, 41, "Text"], Cell[9947, 298, 60, 1, 27, "Input"], Cell[10010, 301, 539, 15, 41, "Text"], Cell[10552, 318, 456, 11, 41, "Text"], Cell[11011, 331, 320, 6, 26, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[11368, 342, 122, 1, 34, "Subsection"], Cell[11493, 345, 1511, 35, 101, "Text"], Cell[13007, 382, 330, 8, 26, "Text"], Cell[13340, 392, 165, 4, 27, "Input"], Cell[13508, 398, 122, 2, 27, "Input"], Cell[13633, 402, 119, 2, 27, "Input"], Cell[13755, 406, 796, 19, 71, "Text"], Cell[14554, 427, 121, 2, 27, "Input"], Cell[14678, 431, 177, 4, 27, "Input"], Cell[14858, 437, 659, 14, 41, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[15554, 456, 128, 2, 44, "Subsection"], Cell[15685, 460, 382, 12, 26, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[16104, 477, 147, 2, 44, "Subsection"], Cell[16254, 481, 296, 6, 26, "Text"], Cell[16553, 489, 115, 2, 27, "Input"], Cell[16671, 493, 146, 2, 26, "Text"], Cell[16820, 497, 115, 2, 30, "Input"], Cell[16938, 501, 641, 17, 41, "Text"], Cell[17582, 520, 76, 1, 29, "Input"], Cell[17661, 523, 427, 11, 41, "Text"], Cell[18091, 536, 637, 10, 26, "Text"], Cell[18731, 548, 450, 10, 41, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[19218, 563, 128, 2, 44, "Subsection"], Cell[19349, 567, 316, 6, 26, "Text"], Cell[19668, 575, 247, 8, 49, "Input"], Cell[19918, 585, 217, 6, 47, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[20172, 596, 256, 4, 44, "Subsection"], Cell[20431, 602, 285, 6, 26, "Text"], Cell[20719, 610, 138, 3, 27, "Input"], Cell[20860, 615, 292, 5, 41, "Text"], Cell[21155, 622, 219, 4, 27, "Input"], Cell[21377, 628, 317, 6, 26, "Text"], Cell[21697, 636, 284, 6, 27, "Input"], Cell[21984, 644, 723, 16, 56, "Text"], Cell[22710, 662, 337, 10, 26, "Text"], Cell[23050, 674, 126, 2, 27, "Input"], Cell[CellGroupData[{ Cell[23201, 680, 122, 2, 27, "Input"], Cell[23326, 684, 96, 2, 27, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[23459, 691, 166, 3, 27, "Input"], Cell[23628, 696, 70, 1, 27, "Output"] }, Open ]], Cell[23713, 700, 123, 2, 26, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[23873, 707, 128, 2, 44, "Subsection"], Cell[24004, 711, 288, 7, 26, "Text"], Cell[24295, 720, 279, 9, 26, "Text"], Cell[24577, 731, 279, 8, 27, "Text"], Cell[24859, 741, 281, 7, 26, "Text"], Cell[25143, 750, 308, 8, 26, "Text"], Cell[25454, 760, 352, 7, 27, "Output"] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)