-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFirstCourseOnRPI_Public_Working.nb
7042 lines (6554 loc) · 263 KB
/
FirstCourseOnRPI_Public_Working.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 10.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 268631, 7033]
NotebookOptionsPosition[ 128661, 4070]
NotebookOutlinePosition[ 252229, 6600]
CellTagsIndexPosition[ 252186, 6597]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[CellGroupData[{
Cell[TextData[{
StyleBox["Mathematica",
FontSlant->"Italic"],
" on the Raspberry Pi"
}], "Title",
CellChangeTimes->{3.6288521112180223`*^9}],
Cell["", "PageBreak"],
Cell[CellGroupData[{
Cell["Welcome!", "Section",
CellChangeTimes->{3.6288521194725323`*^9}],
Cell[TextData[{
"Hi! This is an interactive tutorial about ",
StyleBox["Mathematica",
FontWeight->"Bold",
FontSlant->"Italic"],
" and the ",
StyleBox["Wolfram Language",
FontWeight->"Bold"],
".\n\nInside of this tutorial you are going to learn about computer \
programming on your Raspberry Pi!\n\nNext we will learn about how to use this \
tutorial"
}], "READ",
CellChangeTimes->{{3.6288800634477158`*^9, 3.6288802045966063`*^9}}],
Cell["", "PageBreak"],
Cell[CellGroupData[{
Cell["Using This Tutorial", "Subsection",
CellChangeTimes->{{3.628852141787448*^9, 3.628852160339846*^9}}],
Cell[TextData[{
"Throughout the tutorial, you will see different colored boxes like this \
one.\n\nThis is a ",
StyleBox["READ",
FontWeight->"Bold"],
" cell, it will contain important information"
}], "READ",
CellChangeTimes->{{3.6288521786580963`*^9, 3.6288521794556236`*^9}, {
3.6288522341983957`*^9, 3.628852317640161*^9}, {3.6288802377217517`*^9,
3.6288802628985796`*^9}, {3.6290399808893595`*^9, 3.6290399875958357`*^9}}],
Cell[TextData[{
"This is a ",
StyleBox["DO",
FontWeight->"Bold"],
" cell, it will contain instructions"
}], "DO",
CellChangeTimes->{{3.6288525289775815`*^9, 3.628852539440574*^9}}],
Cell[TextData[{
"This is a ",
StyleBox["TRY",
FontWeight->"Bold"],
" cell, it will contain challenges"
}], "TRY",
CellChangeTimes->{{3.6288525421283803`*^9, 3.6288525571804376`*^9}}],
Cell[BoxData[
InterpretationBox[
TagBox[
FrameBox[
StyleBox[
TemplateBox[{
"\"Click in this box, then click the \"",StyleBox[
"\"CODE\"", Bold, StripOnInput -> False],"\" tab to the left\""},
"RowDefault"],
StripOnInput->False,
LineColor->GrayLevel[0],
FrontFaceColor->GrayLevel[0],
BackFaceColor->GrayLevel[0],
GraphicsColor->GrayLevel[0],
FontFamily->"Arial",
FontSize->14,
FontColor->GrayLevel[0]]],
"Placeholder"],
Style["Great Job!!!", Bold, 14, FontFamily -> "Arial Black"]]], "CODE",
CellChangeTimes->{{3.6288523609571133`*^9, 3.628852371078876*^9}, {
3.628852412019249*^9, 3.6288524204580545`*^9}, 3.6288524830979214`*^9, {
3.628853461603877*^9, 3.6288534643907375`*^9}, {3.6288535134340315`*^9,
3.6288535188986845`*^9}, {3.628853685852455*^9, 3.628853738524663*^9}, {
3.6288538580665293`*^9, 3.628853913111314*^9}, {3.628853974773527*^9,
3.628853979654798*^9}, {3.628854038953918*^9, 3.6288540394062204`*^9}, {
3.6288547354207044`*^9, 3.6288547446818943`*^9}, {3.62885479637398*^9,
3.6288548004116783`*^9}, 3.628854836750967*^9, {3.628876489930292*^9,
3.6288765508231792`*^9}, {3.6289710154231763`*^9, 3.628971041975921*^9}, {
3.6289711248218164`*^9, 3.628971144575019*^9}, {3.628971174733176*^9,
3.628971207337968*^9}, {3.628971254521571*^9, 3.628971472655196*^9}, {
3.6289715159331217`*^9, 3.6289717151720576`*^9}, {3.6289717466530914`*^9,
3.628971760079072*^9}, 3.629039524087329*^9, 3.6290396902093554`*^9}],
Cell[TextData[{
"This is a ",
StyleBox["TEACH",
FontWeight->"Bold"],
" cell, it can contain any notes that students do not need to see.\n\nThese \
cells only show up in the ",
StyleBox["TEACHER",
FontWeight->"Bold"],
" and ",
StyleBox["AUTHOR ",
FontWeight->"Bold"],
"display modes"
}], "TEACH",
CellChangeTimes->{{3.628852216436346*^9, 3.628852217234874*^9}, {
3.6288549282211018`*^9, 3.6288549499545956`*^9}, {3.62903996306544*^9,
3.629040037810396*^9}}],
Cell["", "PageBreak"],
Cell[TextData[{
StyleBox["Creating your own lessons",
FontSize->16,
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
"\nYou can author your own lessons using this document using the techniques \
described below\n\nThis document has three ",
StyleBox["Display",
FontWeight->"Bold"],
" modes (also known as ",
StyleBox["Screen Environments",
FontWeight->"Bold"],
")\n\t1) ",
StyleBox["Author",
FontWeight->"Bold"],
" - fully editable - ",
StyleBox["show",
FontVariations->{"Underline"->True}],
" cell brackets and ",
StyleBox["show",
FontVariations->{"Underline"->True}],
" GroupActivity cells\n\t2) ",
StyleBox["Teacher",
FontWeight->"Bold"],
" - cannot be edited - ",
StyleBox["hide",
FontVariations->{"Underline"->True}],
" cell brackets and ",
StyleBox["show",
FontVariations->{"Underline"->True}],
" GroupActivity cells\n\t3) ",
StyleBox["Student",
FontWeight->"Bold"],
" - cannot be edited - ",
StyleBox["hide",
FontVariations->{"Underline"->True}],
" cell brackets and ",
StyleBox["hide",
FontVariations->{"Underline"->True}],
" GroupActivity cells \n\nThis document has nine cell types that can be used \
to create lessons, these cell types are listed in the ",
StyleBox["Insert Cell",
FontWeight->"Bold"],
" action menu and in the standard ",
StyleBox["Format",
FontWeight->"Bold"],
" menu in the ",
StyleBox["Style",
FontWeight->"Bold"],
" submenu. ",
StyleBox[" Format > Style",
FontWeight->"Bold"],
". \n\nTo create your own lessons, change the display mode of the document \
to ",
StyleBox["Author",
FontWeight->"Bold"],
" using the ",
StyleBox["Display ",
FontWeight->"Bold"],
"action menu in the upper right (explicit directions appear below)."
}], "TEACH",
CellChangeTimes->{{3.628868295113534*^9, 3.6288684667184753`*^9}, {
3.6288684973899755`*^9, 3.628868657174534*^9}, 3.628869501901021*^9, {
3.62886994364016*^9, 3.6288701700830584`*^9}, 3.6288702405471554`*^9,
3.6288704610217285`*^9, 3.6288708852579055`*^9, {3.6288712237922397`*^9,
3.6288712283302727`*^9}, {3.628872609160038*^9, 3.6288728170206065`*^9}}],
Cell[TextData[{
StyleBox["Change Display Mode",
FontSize->16,
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox["\n",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox["\n",
FontWeight->"Bold"],
StyleBox["Using the ",
FontVariations->{"Underline"->True}],
StyleBox["Display",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox[" action menu in upper right corner of this window \n",
FontVariations->{"Underline"->True}],
"Click on the action menu then click on desired display mode \n\n",
StyleBox["Using the standard ",
FontVariations->{"Underline"->True}],
StyleBox["Format",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox[" menu \n",
FontVariations->{"Underline"->True}],
"Select the ",
StyleBox["Format",
FontWeight->"Bold"],
" menu to access the ",
StyleBox["Screen Environment",
FontWeight->"Bold"],
" submenu and click on the desired screen environment, e.g. \n",
StyleBox["Format > Sceen Environment > Student",
FontWeight->"Bold"],
"."
}], "TEACH",
CellChangeTimes->{{3.628870243567174*^9, 3.628870361263836*^9}, {
3.628871141023857*^9, 3.6288711627864094`*^9}}],
Cell[TextData[{
StyleBox["Inserting New Cells",
FontSize->16,
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
"\nCells can only be added in the ",
StyleBox["Author",
FontWeight->"Bold"],
".display mode.\n\n",
StyleBox["Add using the ",
FontVariations->{"Underline"->True}],
StyleBox["Insert Cell",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox[" action menu",
FontVariations->{"Underline"->True}],
"\nClick inside a cell that you want a new cell to appear after, then click \
on the ",
StyleBox["Insert Cell",
FontWeight->"Bold"],
" action menu and click on the desired cell type. Selecting the ",
StyleBox["Launch Horizontal Palette",
FontWeight->"Bold"],
" or ",
StyleBox["Launch Vertical Palette ",
FontWeight->"Bold"],
"within the action menu will create a window with buttons that will create \
cells in your document when clicked (go ahead and give it a try!).\n\n\
Alternatively, click in between any two cells where you would like a new cell \
to appear (the mouse cursor will turn horizontal when you are hovering in \
between two cells and when you click a horizontal line should appear across \
the entire window). Next, click on the ",
StyleBox["Insert Cell",
FontWeight->"Bold"],
" action menu and click on the desired cell type.\n\n",
StyleBox["Add using ",
FontVariations->{"Underline"->True}],
StyleBox["Hotkeys",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox["\n",
FontVariations->{"Underline"->True}],
"Click in between any two cells where you would like a new cell to appear \
(the mouse cursor will turn horizontal when you are hovering in between two \
cells and when you click a horizontal line should appear across the entire \
window). Next, hold the ",
StyleBox["ALT",
FontWeight->"Bold"],
" key and press the number key cooresponding to the cell style that you want \
to insert. Holding ",
StyleBox["ALT",
FontWeight->"Bold"],
" and successively pressing different number keys will change the cell style \
of the inserted cell. The hotkeys are listed in the ",
StyleBox["Insert Cell",
FontWeight->"Bold"],
" menu and the ",
StyleBox["Horizontal and Vertical Palettes",
FontWeight->"Bold"],
".\n\n",
StyleBox["Add using standard ",
FontVariations->{"Underline"->True}],
StyleBox["Format",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox[" menu\n",
FontVariations->{"Underline"->True}],
"Click in between any two cells where you would like a new cell to appear \
(the mouse cursor will turn horizontal when you are hovering in between two \
cells and when you click a horizontal line should appear across the entire \
window). Next, go to the ",
StyleBox["Style ",
FontWeight->"Bold"],
"submenu and select the cell style that you want to insert, e.g. ",
StyleBox["Format > Style > Action",
FontWeight->"Bold"],
". ",
StyleBox["\n",
FontVariations->{"Underline"->True}],
"\n",
StyleBox["Add using ",
FontVariations->{"Underline"->True}],
StyleBox["Right-click",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox[" context menu",
FontVariations->{"Underline"->True}],
"\nRight-click between any two existing cells in the notebook, the context \
menu should include an option ",
StyleBox["Insert New Cell",
FontWeight->"Bold"],
". Hover over that menu option and a list of cell types should appear. Click \
on the desired cell type. "
}], "TEACH",
CellChangeTimes->{{3.628870243567174*^9, 3.628870361263836*^9}, {
3.6288704159333816`*^9, 3.628870420545457*^9}, {3.6288704658329506`*^9,
3.628870637450735*^9}, {3.6288706824227996`*^9, 3.6288708563095565`*^9}, {
3.6288711288367167`*^9, 3.6288711342012978`*^9}, {3.628871169039652*^9,
3.6288712118882823`*^9}, {3.628871243611486*^9, 3.628871294769679*^9}, {
3.6288715438074036`*^9, 3.6288716913720336`*^9}, {3.6288717351072283`*^9,
3.628871832464299*^9}, {3.6288718683412776`*^9, 3.6288722585363894`*^9}, {
3.62887259752726*^9, 3.628872599270424*^9}}],
Cell[TextData[{
StyleBox["Deleting Cells\n",
FontSize->16,
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
"Cells can only be deleted in the ",
StyleBox["Author",
FontWeight->"Bold"],
" screen environment",
StyleBox["\n",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox["\nUsing the ",
FontVariations->{"Underline"->True}],
StyleBox["Remove Cell",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox[" button",
FontVariations->{"Underline"->True}],
StyleBox["\n",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
"The easiest method to delete cells is to click inside of the cell that you \
want to delete so the cursor is flashing inside of it, then click the ",
StyleBox["Remove Cell",
FontWeight->"Bold"],
" button.",
StyleBox["\n",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox["\n",
FontWeight->"Bold"],
StyleBox["Using ",
FontVariations->{"Underline"->True}],
StyleBox["Cell Bracket",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox[" selection",
FontVariations->{"Underline"->True}],
"\nThis is a cumbersome method at first, but does allow the deletion of \
multiple cells and whole groups of cells. Click on the bracket to the right \
of the cell so that it becomes highlighted, then press the ",
StyleBox["delete",
FontWeight->"Bold"],
" button on your keyboard or the ",
StyleBox["Edit > Cut",
FontWeight->"Bold"],
" menu command or right-click on the highlighted bracket and select ",
StyleBox["cut",
FontWeight->"Bold"],
"."
}], "TEACH",
CellChangeTimes->{{3.628870243567174*^9, 3.628870361263836*^9}, {
3.628870427254943*^9, 3.628870435365364*^9}, {3.6288708911998777`*^9,
3.628871097559812*^9}, {3.628872321544503*^9, 3.6288723472506905`*^9}, {
3.629333907171514*^9, 3.6293339090577755`*^9}}],
Cell[TextData[{
StyleBox["Changing Cell Types",
FontSize->16,
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox["\n",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
"Cells can only be changed in the ",
StyleBox["Author",
FontWeight->"Bold"],
" screen environment\n",
StyleBox["\n",
FontWeight->"Bold"],
StyleBox["Using ",
FontVariations->{"Underline"->True}],
StyleBox["Cell Bracket",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox[" selection",
FontVariations->{"Underline"->True}],
"\nClick on the bracket to the right of the cell so that it becomes \
highlighted, then use the ",
StyleBox["Format",
FontWeight->"Bold"],
" menu (as described above for inserting cells) to select the new desired \
cell style or with the cell bracket selected hold the ",
StyleBox["ALT",
FontWeight->"Bold"],
" key and press the appropriate hotkey (as is also described above)."
}], "TEACH",
CellChangeTimes->{{3.628870243567174*^9, 3.628870361263836*^9}, {
3.6288704429354296`*^9, 3.628870450545726*^9}, 3.628871234807602*^9,
3.6288723163009977`*^9, {3.628872370341118*^9, 3.628872583455855*^9}}],
Cell[TextData[{
"At the top of the window you should see a bar with 7 items on it. \n\nFrom \
left to right the items in the bar are:\n1) the ",
StyleBox["Save",
FontWeight->"Bold"],
" button saves any changes you make to the tutorial\n2) the ",
StyleBox["Undo",
FontWeight->"Bold"],
" button will undo the latest change that you have made\n3) the ",
StyleBox["Redo",
FontWeight->"Bold"],
" button will redo any changes that have been undone using the ",
StyleBox["Undo",
FontWeight->"Bold"],
" button\n4) the ",
StyleBox["Back",
FontWeight->"Bold"],
" button takes you to the previous page\n5) the ",
StyleBox["Contents",
FontWeight->"Bold"],
" menu will open an interactive table of contents\n6) the ",
StyleBox["Next",
FontWeight->"Bold"],
" button takes you to the next page\n7) the ",
StyleBox["Display",
FontWeight->"Bold"],
" menu contains controls that change the display mode, set the zoom level, \
control dynamic evaluation, and provide more information about this tutorial"
}], "READ",
CellChangeTimes->{{3.6290406040473647`*^9, 3.629040620154131*^9}, {
3.629040661227578*^9, 3.6290407619408913`*^9}, {3.629041627930746*^9,
3.6290421395873003`*^9}, {3.629333509655512*^9, 3.6293338398746543`*^9}}],
Cell["", "PageBreak"]
}, Open ]]
}, Open ]],
Cell[CellGroupData[{
Cell[TextData[{
"Basics of ",
StyleBox["Mathematica",
FontSlant->"Italic"]
}], "Section",
CellChangeTimes->{{3.628872851712799*^9, 3.628872858602399*^9}}],
Cell[TextData[{
"In this section we will cover the basics of using ",
StyleBox["Mathematica",
FontSlant->"Italic"],
", including:\n\t1) sending simple commands to ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" using the ",
StyleBox["Notebook Interface",
FontWeight->"Bold"],
"\n\t2) learning about valid commands in the ",
StyleBox["Wolfram Language",
FontWeight->"Bold"],
" \n\t3) combining commands to do ",
StyleBox["Computer Programming",
FontWeight->"Bold"]
}], "READ",
CellChangeTimes->{3.62887289156443*^9}],
Cell["", "PageBreak"],
Cell[CellGroupData[{
Cell["Notebook Interface", "Subsection",
CellChangeTimes->{{3.6291232327027807`*^9, 3.629123237162769*^9}}],
Cell[TextData[{
StyleBox["Pretend to be ",
FontWeight->"Bold"],
StyleBox["Mathematica",
FontWeight->"Bold",
FontSlant->"Italic"],
StyleBox[" (5-10 minutes)",
FontWeight->"Bold"],
"\n\nTell kids that you are going to play a game. I will pretend to be ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" to show you how this works. ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" will perform actions based on commands that you give to it. There are four \
steps to this process: choose a command, send that command, give ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" time to think, see the result of your command. It is important that we \
play this game very carefully so we can learn what to expect. \n\nAsk for a \
volunteer to issue commands to ",
StyleBox["Mathematica",
FontSlant->"Italic"],
". Tell everyone that the volunteer has three commands for this game: \
\[OpenCurlyDoubleQuote]squat\[CloseCurlyDoubleQuote], \
\[OpenCurlyDoubleQuote]balance\[CloseCurlyDoubleQuote], and \
\[OpenCurlyDoubleQuote]spin\[CloseCurlyDoubleQuote]. Give them three pieces \
of paper with one command written on each. Give them a fourth piece of paper \
with the word \[OpenCurlyDoubleQuote]jump\[CloseCurlyDoubleQuote] written on \
it. Tell the volunteer that you are now ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" and can only do what they tell you to do using the commands. Ask them to \
choose a command and send it to you. When they hand you a card, make a \
thinking gesture, try to say the word in a funny way and say, \
\[OpenCurlyDoubleQuote]hmmm... can i do that?\[CloseCurlyDoubleQuote]. If \
they hand you one of the three valid commands, then say \
\[OpenCurlyDoubleQuote]YES!\[CloseCurlyDoubleQuote] and perform the action. \
If they hand you the invalid \[OpenCurlyDoubleQuote]jump\
\[CloseCurlyDoubleQuote] command, then say \[OpenCurlyDoubleQuote]I\
\[CloseCurlyQuote]m sorry, I only understand the commands squat, balance, and \
spin\[CloseCurlyDoubleQuote] and hand the card back in a very boring fashion. \
Alternatively, if you get an invalid command you can make the experience very \
fun by a big scene in a robot voice, \[OpenCurlyDoubleQuote]ERROR! ERROR! \
Unrecognized command!\[CloseCurlyDoubleQuote]. If you let them play with this \
in a fun way it allows you to calm their frustrations later by referencing \
the good memory of this exchange. \n\nRepeat the activity for as long as \
there is laughter.\n\nThis activity is meant to engage the children in the \
power dynamic of issuing commands and help them to attribute a personality \
and emotional landscape to the process of computer programming."
}], "TEACH",
CellChangeTimes->{{3.628872921707577*^9, 3.6288729386839285`*^9}}],
Cell[TextData[{
StyleBox["The red ",
FontVariations->{"Underline"->True}],
StyleBox["CODE",
FontWeight->"Bold",
FontVariations->{"Underline"->True}],
StyleBox[" boxes are interactive!!!",
FontVariations->{"Underline"->True}]
}], "READ",
CellChangeTimes->{{3.62887296357456*^9, 3.628872991563594*^9}, {
3.6288730522061267`*^9, 3.628873128444075*^9}, {3.6288732806824923`*^9,
3.6288733657569633`*^9}, {3.628876693127185*^9, 3.628876695665886*^9}}],
Cell[TextData[{
"Click on the words in the red ",
StyleBox["CODE",
FontWeight->"Bold"],
" box below, then click the sideways word ",
StyleBox["CODE",
FontWeight->"Bold"],
" in the tab to left of the box where you clicked."
}], "DO",
CellChangeTimes->{{3.628873352612171*^9, 3.6288733542012315`*^9}, {
3.6288735951774592`*^9, 3.6288736524007072`*^9}}],
Cell[BoxData[
InterpretationBox[
TagBox[
FrameBox[
StyleBox[
TemplateBox[{
"\"Click in this box, then click the \"",StyleBox[
"\"CODE\"", Bold, StripOnInput -> False],"\" tab to the left\""},
"RowDefault"],
StripOnInput->False,
LineColor->GrayLevel[0],
FrontFaceColor->GrayLevel[0],
BackFaceColor->GrayLevel[0],
GraphicsColor->GrayLevel[0],
FontFamily->"Arial",
FontSize->14,
FontColor->GrayLevel[0]]],
"Placeholder"],
Style["Great Job!!!", Bold, 14, FontFamily -> "Arial Black"]]], "CODE",
CellChangeTimes->{
3.6288731879945364`*^9, 3.628873245483961*^9, {3.629123709245629*^9,
3.6291237205892105`*^9}}],
Cell[TextData[{
"Keep a lookout for the red ",
StyleBox["CODE",
FontWeight->"Bold"],
" boxes, they allow you to practice computer programming in the ",
StyleBox["Wolfram Language",
FontWeight->"Bold"],
"."
}], "READ",
CellChangeTimes->{{3.628873371321681*^9, 3.6288735385225935`*^9}, {
3.6288736735178237`*^9, 3.6288736929698277`*^9}}],
Cell[BoxData[
InterpretationBox[
TagBox[
FrameBox[
StyleBox["\<\"Here's another, you know what to do :)\"\>",
StripOnInput->False,
LineColor->GrayLevel[0],
FrontFaceColor->GrayLevel[0],
BackFaceColor->GrayLevel[0],
GraphicsColor->GrayLevel[0],
FontFamily->"Arial",
FontSize->14,
FontColor->GrayLevel[0]]],
"Placeholder"],
Style["Great Job!!!", Bold, 14, FontFamily -> "Arial Black"]]], "CODE"],
Cell["", "PageBreak"],
Cell[TextData[{
"There is another way to use the red ",
StyleBox["CODE",
FontWeight->"Bold"],
" boxes - when you click in the red ",
StyleBox["CODE",
FontWeight->"Bold"],
" box you can also hold the ",
StyleBox["SHIFT",
FontWeight->"Bold"],
" key and press the ",
StyleBox["ENTER",
FontWeight->"Bold"],
" key (keep the ",
StyleBox["SHIFT",
FontWeight->"Bold"],
" key down when pressing the ",
StyleBox["ENTER",
FontWeight->"Bold"],
" key). "
}], "READ",
CellChangeTimes->{3.62887465916987*^9}],
Cell[TextData[{
"Use the new method described above to use the following red ",
StyleBox["CODE ",
FontWeight->"Bold"],
"box."
}], "TRY",
CellChangeTimes->{{3.628873697732272*^9, 3.628873735339409*^9}, {
3.6288744932803435`*^9, 3.62887472530907*^9}}],
Cell[BoxData[
InterpretationBox[
TagBox[
FrameBox[
StyleBox[
TemplateBox[{
"\"Click in this box, hold \"",StyleBox[
"\"\[ShiftKey]\"", FontSlant -> Plain, 24, Bold, StripOnInput ->
False],"\" and press \"",StyleBox[
"\"\[EnterKey]\"", 24, FontSlant -> Plain, Bold, StripOnInput ->
False]},
"RowDefault"],
StripOnInput->False,
LineColor->GrayLevel[0],
FrontFaceColor->GrayLevel[0],
BackFaceColor->GrayLevel[0],
GraphicsColor->GrayLevel[0],
FontFamily->"Arial",
FontSize->14,
FontColor->GrayLevel[0]]],
"Placeholder"],
Style["Great Job, you're a ninja!!!", Bold, 14, FontFamily ->
"Arial Black"]]], "CODE",
CellChangeTimes->{
3.62887414803384*^9, 3.628874746442195*^9, {3.6288760558392496`*^9,
3.6288760648312683`*^9}}],
Cell["", "PageBreak"],
Cell[TextData[{
"Now, we can write commands for ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" in the red ",
StyleBox["CODE",
FontWeight->"Bold"],
" boxes and send those commands by either clicking the sideways word ",
StyleBox["CODE",
FontWeight->"Bold"],
" or by holding the ",
StyleBox["SHIFT",
FontWeight->"Bold"],
" key and pressing the ",
StyleBox["ENTER",
FontWeight->"Bold"],
" key."
}], "READ",
CellChangeTimes->{{3.6288748098635235`*^9, 3.62887488602743*^9}}],
Cell[TextData[{
"Click the placeholder in the red ",
StyleBox["CODE",
FontWeight->"Bold"],
" box below, type any number, then send the command using one of our two \
methods"
}], "DO",
CellChangeTimes->{{3.6288749091348743`*^9, 3.6288749263924084`*^9}, {
3.628874985350168*^9, 3.6288750393642607`*^9}, {3.6288762096269364`*^9,
3.62887630310744*^9}}],
Cell[BoxData[
RowBox[{
TagBox[
FrameBox[
StyleBox[
TemplateBox[{
"\"Click here and type any \"",StyleBox[
"\"number\"", Bold, StripOnInput -> False]},
"RowDefault"],
StripOnInput->False,
LineColor->GrayLevel[0],
FrontFaceColor->GrayLevel[0],
BackFaceColor->GrayLevel[0],
GraphicsColor->GrayLevel[0],
FontFamily->"Arial",
FontSize->14,
FontColor->GrayLevel[0]]],
"Placeholder"], "+", "1"}]], "CODE",
CellChangeTimes->{{3.628875514433061*^9, 3.628875519310326*^9}, {
3.628876095971074*^9, 3.628876096405363*^9}, {3.6288761952763505`*^9,
3.6288762056002493`*^9}}],
Cell["", "PageBreak"],
Cell[TextData[{
"That\[CloseCurlyQuote]s the end of that ",
StyleBox["section!!!",
FontWeight->"Bold"],
"\n\nYou are a doing ",
StyleBox["awesome!!!",
FontSize->18,
FontWeight->"Bold"],
"\n\nKeep up the",
StyleBox[" good work!!!",
FontSize->24]
}], "READ",
CellChangeTimes->{{3.628875063016075*^9, 3.6288751047259483`*^9}}],
Cell["", "PageBreak"]
}, Open ]],
Cell[CellGroupData[{
Cell["Wolfram Language", "Subsection",
CellChangeTimes->{{3.6288752331203194`*^9, 3.628875235992238*^9}}],
Cell["", "PageBreak"],
Cell[TextData[{
StyleBox["Mathematica",
FontSlant->"Italic"],
" can understand a lot of commands. In fact, there is a name for all of the \
commands that ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" can understand, it is called the ",
StyleBox["Wolfram Language",
FontWeight->"Bold"],
". "
}], "READ",
CellChangeTimes->{3.628876788901199*^9}],
Cell["Here are some fun examples to play with!", "TRY",
CellChangeTimes->{{3.628876802626377*^9, 3.6288768237955213`*^9}}],
Cell["", "PageBreak"],
Cell["This will tell us the date and time right now", "READ",
CellChangeTimes->{{3.628876872918354*^9, 3.628876932728778*^9}}],
Cell[BoxData[
RowBox[{"DateString", "[", "]"}]], "CODE"],
Cell["", "PageBreak"],
Cell["\<\
This will tell us the date and time three days from right now\
\>", "READ",
CellChangeTimes->{{3.628876913572975*^9, 3.628876946953291*^9}}],
Cell[BoxData[
RowBox[{"DatePlus", "[",
RowBox[{
RowBox[{"DateString", "[", "]"}], ",", "3"}], "]"}]], "CODE"],
Cell["", "PageBreak"],
Cell["\<\
Type any number in the placeholder below to find the date and time that many \
days in the future\
\>", "TRY",
CellChangeTimes->{{3.6288769837008514`*^9, 3.628877033311005*^9}, {
3.6288771473144236`*^9, 3.628877149336772*^9}}],
Cell[BoxData[
RowBox[{"DatePlus", "[",
RowBox[{
RowBox[{"DateString", "[", "]"}], ",",
TagBox[
FrameBox["\<\"Click here and type a number\"\>"],
"Placeholder"]}], "]"}]], "CODE"],
Cell["", "PageBreak"],
Cell["\<\
Here is another Wolfram Language command that will create a list of numbers\
\>", "READ",
CellChangeTimes->{{3.6288770737072277`*^9, 3.6288770997916574`*^9}}],
Cell[BoxData[
RowBox[{"Range", "[", "10", "]"}]], "CODE"],
Cell["", "PageBreak"],
Cell["\<\
Type any number in the placeholder below to make a list of the integers from \
1 to that number\
\>", "TRY",
CellChangeTimes->{{3.62887713627304*^9, 3.6288771773284817`*^9}}],
Cell[BoxData[
RowBox[{"Range", "[",
TagBox[
FrameBox["\<\"Click here and type a number\"\>"],
"Placeholder"], "]"}]], "CODE",
CellChangeTimes->{{3.628877126580562*^9, 3.6288771325255404`*^9}}],
Cell["", "PageBreak"],
Cell["\<\
That\[CloseCurlyQuote]s the end of this section!
We will learn about more fun things later in the tutorial.
Keep up the great work!!!\
\>", "READ",
CellChangeTimes->{{3.6288772346093874`*^9, 3.628877289561116*^9}}],
Cell["", "PageBreak"]
}, Open ]],
Cell[CellGroupData[{
Cell["Computer Programming", "Subsection",
CellChangeTimes->{{3.6288773025277767`*^9, 3.6288773232586384`*^9}, {
3.628878181312869*^9, 3.628878185266512*^9}}],
Cell[TextData[{
StyleBox["Saving values in variables (5 minutes)",
FontWeight->"Bold"],
"\n\nStore items in cup, store bunch of items in cup, have kids name cups \
and call them by name"
}], "TEACH",
CellChangeTimes->{3.6288773378674026`*^9}],
Cell[TextData[{
StyleBox["Saving lists in variables (5 minutes)",
FontWeight->"Bold"],
"\n\nStore items in cup, store bunch of items in cup, have kids name cups \
and call them by name"
}], "TEACH",
CellChangeTimes->{3.6288773484214563`*^9}],
Cell[TextData[{
StyleBox["Function machine (5 minutes)\n",
FontWeight->"Bold"],
"\nInput person - write word\nCharacters person - writes letters on index \
cards\nRandomSample - mixes cards\nStringJoin - writes word from letters on \
card\nOutput - Says word out loud"
}], "TEACH",
CellChangeTimes->{3.6288773570512247`*^9}],
Cell[TextData[{
"There are four important things that we need to know about the ",
StyleBox["Wolfram Language",
FontWeight->"Bold"],
"\n\t1) ",
StyleBox["Variables",
FontWeight->"Bold"],
" - names that we make up so we can talk to ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" more easily\n\t2) ",
StyleBox["Values",
FontWeight->"Bold"],
" - what ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" sees when we tell it to use a variable\n\t3) ",
StyleBox["Lists",
FontWeight->"Bold"],
" - a group of values in a specific order\n\t4) ",
StyleBox["Functions",
FontWeight->"Bold"],
" - like variables for complex commands that we can send to ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" "
}], "READ",
CellChangeTimes->{3.628877365968184*^9}],
Cell["", "PageBreak"],
Cell[TextData[{
"To create a ",
StyleBox["variable",
FontWeight->"Bold"],
" we simply assign a ",
StyleBox["value",
FontWeight->"Bold"],
" to any single word using the equals \[OpenCurlyDoubleQuote]=\
\[CloseCurlyDoubleQuote] sign\n\nFor example, ",
StyleBox["number = 3 ",
FontWeight->"Bold"],
"assigns the ",
StyleBox["value",
FontWeight->"Bold"],
" 3 to the ",
StyleBox["variable",
FontWeight->"Bold"],
" number"
}], "READ",
CellChangeTimes->{{3.628877394048953*^9, 3.6288775122093134`*^9}}],
Cell[BoxData[
RowBox[{"number", "=", "3"}]], "Input", "CODE",
CellChangeTimes->{
3.612864418114026*^9, 3.612864464616819*^9, {3.612905293952622*^9,
3.6129052987459917`*^9}, {3.61290541783646*^9, 3.612905418750402*^9},
3.612905487099618*^9, {3.6219574276716533`*^9, 3.621957430687955*^9}, {
3.6223901124471197`*^9, 3.622390112562131*^9}, {3.628377632713973*^9,
3.628377637377094*^9}}],
Cell["", "PageBreak"],
Cell[TextData[{
"Now, ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" knows that when we send it any commands with the ",
StyleBox["variable",
FontWeight->"Bold"],
" \[OpenCurlyDoubleQuote]number\[CloseCurlyDoubleQuote] it should use the ",
StyleBox["value",
FontWeight->"Bold"],
" \[OpenCurlyDoubleQuote]3\[OpenCurlyDoubleQuote]"
}], "READ",
CellChangeTimes->{
3.628877531081922*^9, {3.62887757677647*^9, 3.6288775926210566`*^9}}],
Cell[TextData[{
"The command in the following ",
StyleBox["CODE",
FontWeight->"Bold"],
" box asks ",
StyleBox["Mathematica",
FontSlant->"Italic"],
" for the ",
StyleBox["value",
FontWeight->"Bold"],
" of the ",
StyleBox["variable",
FontWeight->"Bold"],
" \[OpenCurlyDoubleQuote]number\[CloseCurlyDoubleQuote] plus 1. "
}], "DO",
CellChangeTimes->{{3.6288775369388413`*^9, 3.62887756249192*^9}, {
3.628877606888876*^9, 3.6288776281550837`*^9}, {3.6288776779253497`*^9,
3.6288777396746254`*^9}}],