Professional Documents
Culture Documents
2015
CodeMonkeyStudiosltd.
Tableofcontents
Introduction
GroupManagement
Lesson1LetsGetStarted
Lesson2TurnAround
13
Lesson3IHaveaPlan!
17
Lesson4TurtleLake
21
Lesson5IntheLoop
25
Lesson6LoopOn
29
Lesson73StarsParty
33
ReferenceCard
35
CharactersReview
37
Support
38
2015
CodeMonkeyStudiosltd.
Introduction
Dearteacher,
ThankyouforchoosingtoteachcodingwithCodeMonkey.CodeMonkeyallowsyou,asan
educator,toenrichyourstudentslives.Throughfunchallengeswithbeautifulanimations
andlovablecharacters,alongsideouruniqueuserexperienceandspecialonlineteaching
tools,youcanintroducebasiccomputerscienceknowledgetoyourstudentsandbetter
st
preparethemforthe21
century.WehavecreatedthisCurriculumGuidetohelpyouteach
codingtoyourstudentsnomatterhowmuchexperienceorpreviousknowledgeyouhave
incomputerscience.
ThiscurriculumcorrespondstothebasicsofCodeMonkey.Inthefirst30challengesof
CodeMonkeyweintroducethefollowingsubjects:objects,functions,statements,arguments
andthesimpleloop.Inourfullcourse,CodeMonkeyover200challengesavailable,covering
moreadvancedtopicssuchasforloops,untilloops,variables,conditionalsandmore.Ifyou
andyourstudentsenjoyourbasiccourse,weencourageyoutoconsiderteachingthewhole
course.Formoredetailspleasevisitplaycodemonkey.com.
InthisCurriculumGuide,youwillfind:
Ashortintroductiontogetyoustarted
7lessonplanseachonedesignedtorun45minutes
ACodeMonkeyReferenceCard
Supportinformation
PleasetakenoteofthefollowingguidelinesforusingCodeMonkeyinclass:
CoffeeScript
TheprogramminglanguageusedinCodeMonkeyiscalledCoffeeScript.Itsa
languagethatcompilestoJavaScript,andsimilarlytoJavaScriptitisusedinthe
industryprimarilyforwebapplications.
Wechosethislanguageforafewreasons,butmainlybecauseofitsfriendlysyntax,
whichresemblesthewaywewriteinEnglish,comparedtootherprogramming
languages.
YoucanreadmoreaboutCoffeeScript
here
.
PriortoClass
Completethefirstfewchallengesorevenall30challengesaheadofclasssoyou
canhelpstudentsduringclasstime.
CodeMonkeyrunswithHTML5soitshouldrunonyourstudentscomputerswithno
problems.
SoundisntnecessarytosucceedinCodeMonkey,butitdoesmakethechallenges
morefun.
Ifyoudonthaveenoughcomputersforallstudents,studentscanworkinpairs.
Makesuretheydiscusstheirsolutionsandworkcollaboratively.Workinginpairscan
2015
CodeMonkeyStudiosltd.
sometimesbemoreproductivebecausediscussingtheprocesswithsomeonehelps
uslearnbetter.
Beforeeachclassreadthroughthedayslessonplanandmakesureyouunderstand
thetopic.
Refertotheseintroductionsasneeded.
Ifyourschoolisnotusingoneofthesupportedloginmethods(Google,Office365,
etc.),createCodeMonkeyaccountsforyourstudentsusingthis
setupguide
.This
guideincludesinstructionsstudentregistrationandmanaginggroups.Makesureto
keepalistofstudentusernamesandpasswordsforfuturereference.
InClass
Duringthefirstclass,youshouldshowthestudentshowtologintotheir
CodeMonkeyaccounts.
Followthedayslessonplan,butfeelfreetodeviatefromit.Weencourageyouto
askmorequestionsandletyourstudentsexpressthemselves.
Whilestudentsareworkingontheactivity,walkaroundtheclassroomandanswer
anyquestionsthattheymighthave.
Giveextraattentiontostudentswhoarefarbehindtheirclassmates,orstudentpairs
thatarenotworkingcooperatively.
Pointyourstudentsattentiontoourstarratingandthemeaningofit.
Onceinawhile,youcanaskforyourstudentsattentionanddiscussdifferentoptions
forsolvingchallenges.
Inthe
teacherdashboard,
youcanseetheactualcodeyourstudentswrote.Usethis
featuretoinspireadiscussioninclass,butbesurestudentsdontknowwhosecode
youareshowing.
Someofthechallengesareassessmentchallenges
.Thismeansthatthestudents
havetodemonstratewhattheyhavelearnedbywritingtheentirecodefromscratch.
WhenYourStudentsHaveDifficulties
Mostoftheissuesyourstudentswillencounterwillresultfromnotreadingthe
instructionsorthecodeitselfproperly.Encouragethemtoreadtheinstructions/code
carefully.TheycanseetheinstructionsagainbyclickingonGordo(lowerleftcorner).
Someofthechallengesaredebuggingchallenges,wherethereisamistakeinthe
codeandthestudentsneedtofixit.Encourageyourstudentstostarteachchallenge
bypressingrunandwatchingwhattheinitialcodedoes.Thiswillhelpclarifywhere
theproblemis.
Encouragestudentsandofferpositivereinforcement:Youredoinggreat,sokeep
trying.
Itsokaytorespond,Idontknowtheanswer.Letsfigurethisouttogether.Ifyou
cantfigureoutaproblem,useitasagoodlearninglessonfortheclass:Technology
doesntalwaysworkoutthewaywewant.Together,wereacommunityoflearners.
Atanytime,youcanusethereferencesolutionsinyourteacherdashboardtosee
threestarsolutionstoallchallenges.
WhatShouldIdoifaStudentFinishesEarly?
Encouragethestudenttogobackandtrytogetthreestarsinallthechallenges.
2015
CodeMonkeyStudiosltd.
Askstudentswhofinishearlytohelptheirclassmateswhoarehavingtroublewith
theactivity.
AfterClass
Usetheteacherdashboardto:
Monitoryourstudentsprogress
Seeyourstudentsactualcode
Seethescoresstudentsreceivedineverychallenge
Determineifthereareanytopicsthatneedtoberepeated
Seestatisticsonyourclasssachievements
Lookupathreestarsolutionforanychallenge
Lastly,remembertohavefun!Itsimportanttousthatourusersknowthatcodingcanbefun
andthatitdoesnthavetobeboringorfrightening.
Atanytime,shouldyouhaveanyquestions,youcancontactusat:info@cmstudios.com.
Goodluck!
TheCodeMonkeyteam
2015
CodeMonkeyStudiosltd.
GroupManagement
This guide will help you get started with creating accounts for your students and managing
your classroom.
If you need help or have questions, please contact us at
info@cm-studios.com
.
General information
1. To access your group:
a. Click the menu icon in the top- right corner.
b. Select
Groups
from the menu. A list of your groups will appear with some
statistics about student progress and activity . Each group corresponds to a
class. If you require an additional group, please contact
info@cm-studios.com.
2. To
change your groups name, follow these steps:
a. Click the group you want to edit.
b. Click
Settings
.
c. Type the new name in the
Name
field. We recommend using the teacher
name, for example, Mrs. Hadlocks Group.
d. Click
Update Group
.
3. To select your preferred language,
click the menu icon in the top- right corner
. Then
click the flag icon and make your selection. This will set the default language for all
students in your groups.
4. Click the map icon in the top- right corner. This will open the Challenge Map showing
all challenges, including skill mode and your star score in each challenge. The map is
accessible for both students and teachers. Teachers can move freely between
challenges. Students can only move within the challenges that they have already
solved.
5. If you want to limit your groups progress, meaning that students wont be able to
progress beyond a certain challenge, follow these steps:
a. Click the group to which you want to limit the progress.
b. Click
Settings.
c. In the
Limit Group Progress
field, check the box saying limit progress of
group.
d. In the text box type the challenge number you wish to be that last challenge
your students can solve.
e. Click on
Save.
f. When your students finish this challenge, a message will appear saying You
have reached your class limit!
2.
3.
4.
5.
Select
Groups
from the menu. A list of your groups will appear, choose your group.
In your dashboard, locate the challenge number you want a solution for.
Click on the number.
You will now see a 3 star solution to this challenge.
To go back to your dashboard, click on the back arrow in your browser.
To see a students solution to a challenge, locate a students username in the table.
Click on the star that represents the solution to the challenge you want to see
Once you click on the star, a pop up window will appear with a time stamp. If the
student solved the challenge more than once, a few time stamps will appear, each
with its own star. Pick which solution you want to see and click on the time stamp.
10. You will now see the students solution to this challenge.
2.
3.
4.
5.
6.
7.
8.
9.
2015
CodeMonkeyStudiosltd.
Lesson1LetsGetStarted
Challenges05
Thislessonintroducesstudentstothefascinatingworldofcomputersandtothe
CodeMonkeyplatform.Someofyourstudentsmaybefamiliarwiththetermscodingand
programmingandfeelcomfortableworkingwithcomputers.Forothers,learningtocode
maybeanintimidatingexperience.Aseducators,ourgoalistohelpstudentslearnand
exploreavarietyofsubjects,includingcomputerscience.Wewanttocreateanenvironment
wherestudentscanlearnfromtheirmistakesandbuildtheirfoundationalknowledgeto
createsomethingnew.
Objectives
:
Withinthislesson,studentswill:
Define
coding
and
computerprogramming
BecomefamiliarwiththeCodeMonkeyplatform
Completechallenges05onCodeMonkey
Components
:
Instructions:step,turn
Terms:challenge,CoffeeScript
Part1:Introduction10minutes
Discussion
2min.
1. Howmanyofyouhaveeverusedacomputer?
2. Haveyouevercreatedsomethingonacomputer,likeapresentation,adrawing,or
maybeevenagame?
3. Lettwoorthreestudentstelltheclasswhattheycreated.
Explain
1min.
Inorderforallofourfavoriteapplicationsandgamestoworkonacomputer,wehaveto
giveinstructionstothecomputer.Computerscantthinkforthemselves,theydowhatever
wetellthemtodo.Givinginstructionstothecomputeriscalledcomputerprogrammingor
coding.
Activity
3min.
Playashortgamewithyourstudentstoillustrateinstructions.Placeanobjectsomewhere
visibleintheclassroom.Askyourstudentstogiveyouinstructionstoguideyoufrom
whereyouarestandinginclasstotheobject.
Whatinstructionsdidthestudentsuse,e.g.,step,turnright,turnleft?
2015
CodeMonkeyStudiosltd.
Discussion
2min.
Docomputersspeakthesamelanguageashumans?
Computershavetheirownlanguagestheycantunderstandhumanlanguageaswe
understandit.HTML,JavaScript,andPythonarejustafewofthelanguagescomputers
speak.Eachlanguageisdifferent,buttheyallhavesomethingincommon:theyrequirea
certainwayofthinking,clearinstructions,andstructure.Basically,learningacoding
languageisjustlikelearninganewlanguage.
Watch
2min.
TodayyouwillstartlearningbasiccodingprinciplesthroughagamecalledCodeMonkey.
Thelanguagewewilllearniscalled
CoffeeScript
.
Showthe
CodeMonkeyTrailer
tothestudents.
Part2:LetsGo!25minutes
Explain
3min.
GototheCodeMonkeywebsite:
playcodemonkey.com
InstructthestudentshowtologintotheirCodeMonkeyaccounts.
Ifthestudentsuseusernamesandpasswordstologin,makesuretheystoretheir
usernamesandpasswordswheretheycaneasilyaccesstheminthefuture.Optional:
handoutuser/passwordcards.
Atanytime,shouldastudentforgettheirpassword,youcanresetitbyvisitingtheteacher
dashboard,locatingthestudentsusername,andclickingontheeditbuttonwhichwill
appearifyouhoverovertheusername.
Walkthrough(1)
4min.
WalkyourstudentsthroughthebasicappearanceofCodeMonkey:
1. Clickontheplaynowbuttononthehomepage
2. Watchtheshortintroductionanimation
3. Readtheinstructionsoutloud
4. TheCodeMonkeygameisbuiltoflevelscalledchallenges.Thisiswhata
challengelookslike.
5. Theeditorontherightiswhereyoullwriteyourcode.Youcanalsousethe
buttonsatthebottomforeasyaccess.
6. Ontheleftisthestage,thisiswhereyoullseeyourcodecometolife.Yourgoalis
tocompleteeverychallengebyhelpingthemonkeycatchthebanana
7. ThemonkeyonthelowerleftcornerisGordo,hewillgiveyouinstructionsand
sometimesevenhintsifyourestuck.Atanytime,youcanclickonGordotosee
theinstructionsagain.
Walkthrough(2)
3min.
8. Ineverychallenge,youwillexecutethecodebyclickingontherunbuttontosee
2015
CodeMonkeyStudiosltd.
10
whatthestartingcodewilldo.
9. Thecodeontherightsaysstep15,sowhenwellclickonrunthemonkeywill
step15stepsforward.
10. Clickonrun.
11. Wecompletedthefirstchallenge.Aftereverycompletedchallenge,youllgetastar
scoreratingyoursolution.3starsisthehighestscoreandisrewardedforcatching
allthebananas,implementingnewlearnedtopics,andwritingshortcode.Ifyou
getlessthan3stars,ahintwillhelpyougetthemall.Youcantrytosolvea
challengeasmanytimesasyouwant,itwillnotaffectyourstarsscore!
12. Clickonreplaytoseeyoursolutionagain.
13. Editthesolutiontochangeitfrom
step15
to
step5
step10
14. Clickrunagaintoexecuteyoursolutionagain.Showthestudentsthatthis
solutiononlygot2stars,anddrawtheirattentiontothehintthattellsthemhowto
getthe3rdstar.
15. Clickreplayagain,fixthesolutiontoget3stars,andexecuteitagainbyclicking
run.
Walkthrough(3)
3min.
16. Letsmoveontothenextchallenge,clickonnextchallenge.
17. Readtheinstructionsoutloud
18. Thecodeontherightsaysstep10,letsclickonrunandseewhathappens.
19. Themonkeydidntwalkfarenough,andthehinttoldustotrystep15,lets
changethenumber10to15,andclickrunagain.
20. Itsalwaysagoodideatousethecodethatwasthere.Beforewetrytochangethe
code,clickruntoseewhathappens,readthehint,andthentrytosolve.It
doesntmatterthatyourancodethatdoesntsolvethechallenge.Besides,the
codeisthereforareason,sodontdeleteit.
21. Anothergoodstrategyforwhenyourestuckistostartagainfromthebeginning,in
casesliketheseyoucanresetyourcodebyclickingontheresetbutton.
22. Clickthereplaybutton,andthenclicktheresetbuttontoshowyourstudentshow
toresetthecodetowhatitwasinthebeginning.
23. Solveagainbyeditingthecodeandclickruntoexecutethesolution.
24. Showyourusershowtogobacktochallenge0byclickingonthemap(topright
corner)andclickingonchallenge0.Notethatunlikeyouasateacher,your
studentswillnotbeabletoskipforwardbeyondthefirstchallengethattheyhave
notsolvedyet.
Playtime
10min.
Allstudentsshouldcompletechallenges05withatleasttwostars.(Studentsfromthe
ageof12andupshouldgetthreestars.)Usetheteacherdashboardtokeeptrackof
studentsachievements.
2015
CodeMonkeyStudiosltd.
11
Ifstudentsarehavingtroubleconfusingrightandleft,drawtheirattentiontothewatchon
themonkeysleftwrist.Tellthemthatturninginthedirectionisleft.
Review
2min.
Openchallenge#2andshowtheruleranimation.Followtheinstructionstomeasurethe
distancebetweenthemonkeyandthebanana,andthenusethatdistancetofixthecode.
Makesureyourstudentsunderstandhowtousetheruler.
Part3:Debriefing10minutes
Discussion
5min.
Whatinstructionsdidyoulearntoday?
WhatdidyoulikemostaboutCodeMonkey?
Besidesinstructions,whatelsedidyoulearntoday?
Howdoyouget3starsinaCodeMonkeychallenge?Doesitmatterhowmany
timesItriedtosolvethechallenge?(No,itdoesnt!)
Whatdoyoudowhenyouarestuck?(thefollowingtwoquestionsarerelated)
InaCodeMonkeychallenge,howdoyoudisplaytheinstructionsagain?
InaCodeMonkeychallenge,howdoyouresetthecodetowhatitwasinthe
beginning?
Review
3min.
Openchallenge6andsolveitwithyourclass.Theywillsolveitbythemselvesinthenext
lesson.
Assignment
2min.
Duenextlesson,createamapwithyourroutetoschoolbywritingthedirectionsas
computerinstructions,justlikeyoulearnedtoday.Youcanalsoroutethewayfromyour
roomtootherplacesinyourhouse,orevenfromyourhomeroomatschooltothe
playground.BesuretousethebasicinstructionsusedinCodeMonkey.
Showanexampleofsuchasequenceofinstructionsonthewhiteboard.
2015
CodeMonkeyStudiosltd.
12
Lesson2TurnAround
Challenges610
Inthislesson,studentswillcontinuetoexploretheCodeMonkeyplatformbycompletingfive
morechallenges.Priortoclass,usetheteacherdashboardtomakesureallofyourstudents
havecompletedthefirstfivechallengeswiththreestars.Itisimportantthatallstudentsare
onthesamelevelandnooneisbehind.
Objectives
:
Withinthislesson,studentswill:
Reviewwhattheylearnedinthepreviouslesson
Identifythedifferentwaystouseturninstructions
Completechallenges610onCodeMonkey
Components
:
Instructions:turnusingdegrees,stepbackwards
Terms:program,function,argument,statement,object
Part1:Introduction25minutes
Review
5min.
Collectthehomeassignments.
Startwithabriefdiscussionwiththeclassofwhatwaslearnedinthepreviouslesson:
Whatiscoding?
Whatinstructionshaveweusedsofar?(step,turn)
WhatisaprogramminglanguageandwhichonedoweuseinCodeMonkey?
(CoffeeScript)
Activity
5min.
Askforthreevolunteers,givingeachofthemarole:oneistheProgrammer,oneisthe
Computer,andthethirdistheCharacter.NowasktheProgrammertoinstructthe
ComputertoleadtheCharactertoanobjectyouplacedintheclassroom.Makesure
thestudentsuseinstructionsproperly(stepwithanumber,turnleft/right).Astheygo,
writetheinstructionsontheboardtoremindtheotherstudentsofwhattheyhavelearned.
Repeatthisactivitywithanothergroupofthreevolunteers.
2015
CodeMonkeyStudiosltd.
13
Discussion
3min.
Askthestudents,Whydoyouneedbothacomputerandacharacter?Whycantone
personbeboth?
Ifwecompareprogrammingtothehumanbody,thentheprogrammeristhebrainthat
sendsinstructionstothedifferentpartsofthebody.Thecomputerisresponsiblefor
makingsurethatthedifferentpartsofthebody(characters)executetheinstructions
exactlyasinstructed.
Explain
2min.
Introduceyourstudentstotheterm
statement
:anelementwhichexpressessomeaction
tobecarriedout.Acomputerprogramisasetofinstructionswhicharesimpletasks
providedtothecomputer.Theseinstructionsarecalledstatements.Theinstructionsthe
ProgrammergaveearliertotheComputerarestatements.Statementscanbeanything
fromasimplelineofcodetoacomplexsetofconditionsandformulas.
Explain
3min.
Thislessonisaboutturningandwalkingbackwards.Therearethreewaystomakea
characterturnthefirstistouseturnright/leftlikewelearnedinthefirstlesson.Inthis
lesson,weareintroducinganotherwaytoturn.
Insteadofturningright/left,wecanturnbydegrees.Ifyourstudentshavebasic
knowledgeofdegrees,suchasa360degreeturnora90degreeturn,thenmakeaquick
reviewofthatknowledge.Otherwise,provideashortintroductiontodegrees.Optional:
useaprotractor.
Explain
3min.
Objectsareeverythinginthescenewecaninteractwith,likethebush,bridge,banana,
andturtle.
Eachobjecthasasetofactionsitcando,likestep,turn,orturnTo(welllearnabout
turnTointhenextlesson)forthemonkey.Theseactionsarecalledfunctions,andthe
inputweaddtothemiscalledanargument.Forexampleinturn10,theargumentis10.
Discussion
Asktheclasstogiveyouanexampleforastatementandwriteitonthe
whiteboard(possibleresults:step10,step15,turnright,turnleft)
Askwhatisthefunctioninthisstatement(steporturn)
Askwhatistheargument(10,15,rightorleft)
Explain
2015
CodeMonkeyStudiosltd.
2min.
2min.
14
Understandingtheconceptofwalkingbackwardsisprettyeasy.Ifwewanttogoforward
15steps,wetypestep15,andifwewanttogobackwards,wetypestep15.15will
bereadbythecomputerinthiscontextjustlike15stepsbackwards.Ifyourstudents
areolder(6thgradeandabove),thisisagoodopportunitytotalkaboutnegativenumbers
onthenumberline.
Part2:LetsGo!15minutes
Login
1min.
AskthestudentstogototheCodeMonkeywebsite(
playcodemonkey.com
)
andloginto
theiraccounts.Ifastudentishavingtroublerememberinghisorherlogininformation,use
yourlistorthecardstoremindthestudentoftheassignedusernameandpassword.
Playtime
2min.
Allstudentsshouldcompletechallenges69withatleasttwostars.(Studentsfromthe
ageof12andupshouldgetthreestars.)Usetheteacherdashboardtokeeptrackof
studentsachievements.
Keepinmindthatstudentsmightfindturningwithdegreesdifficult.Youmayneedto
provideextrahelpinlevels7and8.UsetheWalkthroughbelow.
Walkthrough
2min.
Openchallenge#7andshowtheanimationaboutangles.Usetherulertomeasurethe
distancebetweenthemonkeyandthebanana,andshowthatrulerisalsoaprotractor:it
showsthenumber45whichistheanglethemonkeyhastoturninordertofacethe
banana.Showthatthisisthesamenumberinthecode.Makesureyourstudents
understandhowtousetherulerasaprotractor.
Explain
2min.
Openthechallengemapandshowyourstudentstheskillmodetab.Explainthatinskill
modestudentscanplaythroughmorechallengestoperfecttheirCodeMonkeyskills.
Theseextrachallengesaregreatpracticeandtheyonlyunlockafterwecompletecertain
challenges.Hoveroveralockedchallengetoshowtheunlockingtip.Thefirstskill
challengeswillopenforyourstudentsaftertheycompletechallenge6.
Letstudentsknowthatiftheyfinishearly,theycangotoskillmodeandcomplete
unlockedchallenges.
Playtime
2015
CodeMonkeyStudiosltd.
5min.
15
Thestudentscontinueworkingonlevels69.
Inlevel8,thestudentscanuseeitherTurnleftorTurn90togetthreestars.Someof
yourstudentswillprobablyuseturnleft.Makesuretoemphasizethattheycanalsouse
turn90forthesameresult.
3min.
Assessment
Challenge#10isanassessmentchallengethatcoverseverythingyourstudentsrecently
learnedonCodeMonkey.
Part3:Debriefing5minutes
Review
2minutes
Checkyourstudentsunderstandingofturningwithdegrees:Askallofthemtostandup
andinstructthemtoturn90,turn120,andturn360.
Repeattheexplanationofturningbydegrees:turnfollowedbyanumberturnsthe
monkeybythatnumberofdegrees.Forexample,turn90turnsthemonkeythesameas
turnleft.
Review
2minutes
Checkyourstudentsunderstandingofwalkingbackwards:Standwithyourbacktothe
doorandask,IfIwerethemonkeywhatwouldbetherightinstructiontogetmetothe
door?.Emphasizethatitshouldbeoneinstruction,andnotinvolveturning.
Makesure
theiranswerincludesstep
minus
X.
Repeattheexplanationofsteppingbackwards:tostepbackwardsanumberofsteps,add
theminussign()beforethenumber.Forexample:step10.Thecomputerreads10in
thiscontextjustlike10stepsbackwards.
Assignment
1minute
Duenextlesson,askyourstudentstoincludedegreesinthenavigationinstructionsfrom
theirhomestotheschool.
2015
CodeMonkeyStudiosltd.
16
Lesson3IHaveaPlan!
Challenges1115
Thislessonrevolvesaroundplanning.Everythingwedointhephysicalworldhastobe
planned,evenifwesometimesdothingsautomatically.Wecancrosstheroadwithout
checkingifitsclear,butthatmayresultinaverydangerousoutcome.Computersarethe
sameifwewanttocreateagameoraprogram,wehavetoplanaheadandorganizeour
instructionsinthecorrectorder.
Objectives
:
Withinthislesson,studentswill:
Reviewwhattheylearnedinthepreviouslesson
Discusstheconceptofplanninganditsimportanceincoding
Completechallenges1115onCodeMonkey
Components
:
Instructions:turnTo,turtle.step
Terms:planning
Part1:Introduction20minutes
Review
5min.
Collectthehomeassignments.
Recallthatwehavelearnedtwowaystoturn,andaskthestudentstosaysomeexamples
tobothofthem.Thefirstwayisturnrightandturnleft,theotheroneisturn45,turn30,
etc.
Introducethethirdwaytoturn:byusingturnTo.WhenusingturnTothecomputer
identifiesthatthereisanotherobjectpresent,besidesourbelovedmonkey,andbycalling
itsname,itknowswhichwaytoturn.
Reviewthefirsttwowaystoturnbyaskingforatwovolunteersandinstructeachofthem
toexplainanddemonstrateoneofthewaystoturnwelearnedinthepreviouslesson:
Direction(e.g.turnright)
Degree(e.g.turn180)
Writetheiranswerswiththeexamplesontheboardsoyourotherstudentsrememberas
well.
Activity
2015
CodeMonkeyStudiosltd.
5min.
17
TocheckyourstudentsunderstandingofturnToPlayashortgameinthespiritofSimon
Says.GiveinstructionstoyourstudentstoturnToaspecificplaceoraspecificstudent.
TheyshouldonlyturnwhenyousayturnTo,andnotwhenyousayturn.
Activity
5min.
Inthislesson,yourstudentswilllearnaboutplanning.
Askyourstudents,Whatdoyoudointhemorningtogetreadyforschool?
Writetheiranswers
scattered
ontheboard(notinalist).
Next,createalistoutoftheactionsontheboard,andputthetasksoutoforder,for
example:
1.Getdressed
2.Takeashower
3.Wakeup
4.Brushmyteeth
5.Eatbreakfast,etc.
Discussion
5min.
Askyourstudents,Isthistheorderofactionsyouwilltaketogetreadyinthemorning?
Whentheysayno,askthemtoexplainwhynot.
Thepointofthisactivityistoshowthestudentstheimportanceofplanning.Weplanour
dayandtheorderinwhichwedothingssometimeswedothiswithoutthinkingand
sometimesweplaneverystep.
Explaintoyourstudentsthatwhenwewritecode,wehavetoconsiderthatcomputers
readthecodefromTOPtoBOTTOM,andwehavetothinkaheadabouttheorderof
instructions.Whenwehavejustoneobject,thisisntabigproblem(inourcase,the
monkeyistheobject).Butwhathappenswhenwewanttocontrolanotherobject?Howdo
weknowwhoshouldbeinstructedtogofirst?
Inthislessonschallenges,yourstudentswillmeetourtrustyturtleandwillhavetousehis
helptogetmorebananas.Inordertodoso,theywillhavetothinkaheadandplanhowto
writethecode.
Part2:LetsGo!20minutes
Login
2015
CodeMonkeyStudiosltd.
1min.
18
AskthestudentstogototheCodeMonkeywebsite(
playcodemonkey.com
)
andloginto
theiraccounts.Ifastudentishavingtroublerememberinghisorherlogininformation,use
yourlistorthecardstoremindthestudentoftheassignedusernameandpassword.
Playtime
2min.
Allstudentsshouldcompletechallenges1115withatleasttwostars.(Studentsfromthe
ageof12andupshouldgetthreestars.)Usetheteacherdashboardtokeeptrackof
studentsachievements.
After2minutes,usethefollowingwalkthrough:
Walkthrough
6min.
Openchallenge#12andshowtheanimation.Itexplainshowtouseobjectsonthe
screen.Aftertheanimation,walkyourstudentsthroughthefollowingsteps:
1. Hoveroverthebridge,showthatthewordbridgeappearsonthescreen
2. bridgeisthenameofthatobject.
3. Highlightthewordbananaintheeditor
4. Clickonthebridgeandshowhowthewordbananaisreplacedbybridge
5. Movethecursorbyclickingonrow3afterthewordturnTo
6. Clickthebananaandshowhowthewordbananaisenteredintothecode
7. Movethecursortoline4andwritestep10
8. Runthesolution
9. Clickreplaytogobacktoyoursolution
10. Deleteallthecodetostartfromblank.
11. Nowyouwilldemonstratehowtouseevenmoreclickinginsteadoftyping.
12. Hoverovertheblockstepatthebottomoftheeditor,showhowadescription
showsup
13. Showthedescriptionsthatshowupwhenhoveringovereveryblock
14. Byclickingstep,turnTo,bridge,andbanana,reachthefollowingsolution:
turnTobridge
step10
turnTobanana
step10
15. Makesureyouhaveonlyusedthekeyboardfortypingthenumberandjumpingto
thenextline.
16. Makesureyourstudentsunderstandhowtouse
clickingandhovering
forobject
onthestage(banana,bridge)andforblocksatbottom(turnTo,step).
Playtime
2015
CodeMonkeyStudiosltd.
6min.
19
Thestudentscontinueworkingonchallenges1115.
5min.
Assessment
Challenge#15isanassessmentchallengethatcoverseverythingyourstudentsrecently
learnedonCodeMonkey.
Practice
Encouragestudentswhofinishearlytoopenskillmodeonthemapandcomplete
unlockedchallenges.
Part3:Debriefing5minutes
Discussion
4min.
Openlevel14andaskyourstudents,Howdidyouplanwhattowriteinyourcode?
Makesuretoleadthemtothecorrectanswer,explainingtherighttrainofthoughtneeded
whenplanningthecode.Weshouldfirstthinkaboutwhatstepsshouldbetakento
achieveourgoal(inthiscase,getthebanana),andthenbreakthestepsintoseparate
statements,whiledecidingwhatshouldcomefirst(shouldtheturtleormonkeygofirst?).If
wetellthemonkeytomovebeforetheturtleisintherightplace,heisgoingtofallinthe
water,andmonkeysdontlikewater.
Review
1min.
Usethisopportunitytoremindyourstudentsthata
programisasetofinstructions,or
simpletasksprovidedtoacomputer.Theseinstructionsarecalledstatements.
S
tatementscanbeanythingfromasinglelineofcodetoacomplexmathematical
equation
.
2015
CodeMonkeyStudiosltd.
20
Lesson4TurtleLake
Challenges1620
Intheprevious3lessonsyourstudentshavelearnedhowtomovearoundusingcode.They
haveactuallymasteredthefoundationtoprogramming,astheyarenowabletowriteablock
ofcodethatwillcarryouttheinstructionstheyintendtogivethecomputer.Wewilltakethe
currentlessontopracticeandreinforcethisknowledge,andtodeepentheirunderstanding
ofwhatisactuallygoingon.
Objectives
:
Withinthislesson,studentswill:
Practiceusingfunctionswithdifferentobjects(monkey,turtle)
Completechallenges1620onCodeMonkey
Components
:
Instructions:turtle.turnTo
Terms:syntax
Part1:Introduction10minutes
Explain
5min
RecallwithyourstudentsthatinCodeMonkeywearewritingcodeinaprogramming
languagecalledCoffeeScript.Astheyexperiencedinthepreviouslessons,thecodehas
tobewritteninaparticularwayinorderforthecomputertodowhatwearetryingto
achieve.
Explainthatthisisbecauseaprogramminglanguage,justlikeanylanguage,hasitsown
rulesonhowthingscanbesaidorwritten.Inprogrammingthisiscalledthe
syntax
ofthe
language.
TheremightbemorethanonecorrectwaytosayorwriteacertainthinginCoffeeScript,
justlikeinEnglishoranylanguage.Animportantdifferencebetweenprogramming
languagesandotherlanguagesisthis:
Inaspokenlanguage,sometimeswecansaysomethingincorrectlybutstillbe
understood.However,withthecomputer
eventheslightestmistakewilldefinitelycause
ourcodetofail.Sowealwayshavetopayattentiontosyntaxandbeveryaccurate.
Forexample,ifweforgetadotoraspaceinturtle
.
step10wewillgetturtle
step10or
turtle
.
step10,andthecodewillnotdotherightthing.
Walkthrough
2015
CodeMonkeyStudiosltd.
5min.
21
Openchallenge#15andclickresettoresetthecodetowhatitwasinitially(blank).
Usetypingonly,noclicking,andenterthefollowingcode:
turtlestep10
Clickruntoexecutethecode.Readoutloudtheerrormessagethatappears.Explainthat
thedotisimportant.Inthisexamplethecomputerwasabletoguesswhatwemeant,but
thisisnotalwaysthecase.
Editthecodetothiscode:
turtle.step10
step15
Executeitandreadtheerrormessagewiththestudents.
Repeatthesamewiththefollowingmodificationtothe2ndline(capitalS):
turtle.step10
Step15
Andwiththefollowing(withoutbreakingbetweenlines):
turtle.step10step15
Concludethatspelling,punctuation,capitalsandnewlinesarepartofthesyntaxandare
essentialforourcodetodowhatwewant.
Finally,runa3starsolution:
turtle.step10
step15
Whenitcompletes,clickreplayandeditittothefollowing:
turtle.step10
monkey.step15
Concludewithyourstudentsthatstepandmonkey.stepcanbeusedinterchangeably,
becausethecomputerassumeswearereferringtothemonkey.Whenwerefertothe
turtleoranyotherobject,wemustuseitsname.
Part2:LetsGo!30minutes
Login
1min.
AskthestudentstogototheCodeMonkeywebsite(
playcodemonkey.com
)
andloginto
theiraccounts.Ifastudentishavingtroublerememberinghisorherlogininformation,use
yourlistorthecardstoremindthestudentoftheassignedusernameandpassword.
Playtime
2015
CodeMonkeyStudiosltd.
25min.
22
Allstudentsshouldcompletechallenges1620withatleasttwostars.(Studentsfromthe
ageof12andupshouldgetthreestars.)Usetheteacherdashboardtokeeptrackof
studentsachievements.
Notethatchallenge#16isatrickyonetoachievethreestars.Makesureyourstudentsdo
notstayonthischallengefortoolongandencouragethemtokeepgoingandcomeback
toitiftheyhavetimeleft.Attheendofthelesson,youcanopenadiscussionregarding
thischallengeandtrytosolveittogetherwithyourstudentsinordertogetthosesneaky
threestars.
Inchallenge#19therearedifferentwaystomakethemonkeyturntherightwayafter
catching3bananas.Onewayisbyusingtheisland
turtle.turnToisland
andonewayisbyusinganyofthebananasalongthatpathe.g:
turtle.turnTobananas[3]
Inbothcases,hoveringand/orclickingwilldothetrick.Remindyourstudentsthat
hoveringoveranobjectshowsitsname,andclickingentersthatnameintotheeditor.
Ifyourstudentsaskyouaboutthemeaningofsomethinglikebananas[3]justtellthem
thatitsthewaytoaccessaparticularbananaandwewillgetbacktoitlateron.
Assessment
4min.
Notethatchallenge#20isanassessmentchallengethatcoverseverythingyourstudents
recentlylearnedonCodeMonkey.
Practice
Encouragestudentswhofinishearlytoopenskillmodeonthemapandcomplete
unlockedchallenges.
Part3:Debriefing5minutes
Walkthrough
5min.
Openchallenge27inskillmodeandsolveitwithyourclass.Askthemtoexplainhow
they
plan
thesolutionforthischallenge.Youcaneveninviteastudenttosolvethis
challengeinfrontoftheclass.
Thetrickinthischallengeissimilartotheoneinchallenge16tellthemonkeytowalk
backwardsinordertohavelesslinesofcode,andtogetthethirdstar.
2015
CodeMonkeyStudiosltd.
23
Ifatfirsttryyourstudentscantgetthethirdstar,askthemifthischallengeseemssimilar
toonetheyvesolvedbefore.ExplainthatItsfairlycommontousereferencesfromold
projectswhenprogramming,orevenfullblocksofcode,andinCodeMonkeytheyare
encouragedtogobacktooldchallengestogetinspirationorhelp.
2015
CodeMonkeyStudiosltd.
24
Lesson5IntheLoop
Challenges2125
Congratulations!YouhavepassedtheintroductorypartofCodeMonkey.Youandyour
studentsnowholdbasicprogrammingskills.Thislessonwillfocusonloops.Thereare
differentkindsofloops,likeforloopsanduntilloops,butfirstwewilllearnhowtousea
simpleloop.
Objectives
:
Withinthislesson,studentswill:
Define
loop
asaprogrammingterm
Understandwhyusingloopsinprogrammingismoreefficient
Completechallenges2125onCodeMonkey
Components
:
Instructions:x.times>
Terms:loop
Feature:tab(indentation)
Part1:Introduction25minutes
Discussion
5min.
Programmingisnotonlyaboutwritingthecorrectstatementsintherightorderitisalso
aboutknowinghowtowriteclearandshortcode.
Letsimaginethatwehavetowriteasimpleprogramtomakethemonkeyclimbupalong
staircaseof100steps,andwecanonlyusethefunctionstepUpthatmakesthemonkey
climbuponestepatatime.
Askyourstudents,Doyouthinkthattheprogrammerwrotealineofcodeforevery
stairstep?
JustimaginehowLONGthiscodewouldbe100linesofcode!
So,insteadofcodethatlookslikethis(100times):
stepUp
stepUp
stepUp
stepUp
2015
CodeMonkeyStudiosltd.
25
stepUp
Wouldntitbegreattowritesomethingshorter?Askthestudentstosuggestashorter
way.
Howaboutsomethinglikethis?
stepUp100times
Luckily,thisispossible.Notexactlythewaywejustwroteitnow,butquitesimilar.Code
thatiswritteninsuchawayiscalledaloop.
Explain
5min
Explaintoyourstudentsthatasimpleloopisasequenceofinstructionsthatrepeatsa
specifiednumberoftimes.Therearealsootherkindsofloops(forloops,untilloops)that
lastuntilaparticularconditionismet,butwewilllearnaboutthoselateron.
Backtothestairsexample,thewaytowritethatinCodeMonkeywouldbe:
100.times>
stepUp
Thenumberrepresentsthenumberoftimesthatwewantthecodeinsidethelooptorun.
Notethespecialsyntax:thedotbetweenthenumberandthewordtimes,thespace
beforethe>,andthe
indentation
ofthecodeinsidetheloop(stepUpisthecodeinside
theloop).
MakesurethestudentsknowhowtousetheTabkeyontheirkeyboardinordertoget
indentationintothecode.Anotheralternativeistopressthespacebarfourtimes.
Rememberthatyoucanclickthetimesbuttonatthebottominordertogetaloopinto
thecodewithouthavingtoworryaboutthesyntax.
Activity
10min.
Letsshowanotherexampletobetterclarifytheuseofasimpleloop.Writethefollowing
onthelefthandsideoftheboard:
step10
turnleft
step10
turnleft
step10
turnleft
step10
2015
CodeMonkeyStudiosltd.
26
turnleft
Askyourstudentstoidentifya
repeatingpattern
inthecode.Thepatterntheyidentify
shouldbe:
step10
turnleft
Now,nexttothatcode,ontherighthandside,write:
4.times>
step10
turnleft
Askyourstudentswhattheythinkeachblockofcodedoes.
Explainthateachcodeisthesameonlytherighthandsideofthecodeiswrittenasa
loop.Oncewefoundthepatternonthelefthandside,allwehadtodoisjustwriteitonce,
andadd4.times>.Theresultingcodedoesthesame,butisshorterandmorereadable.
Themeaningofthecodeontherightisthatstep10,turnleftwouldrepeatfourtimes,
andthentheloopwouldbeover.Oncetheloopisover,thecomputermovestothenext
statement.
Part2:LetsGo!15minutes
Login
1min.
AskthestudentstogototheCodeMonkeywebsite(
playcodemonkey.com
)
andloginto
theiraccounts.Ifastudentishavingtroublerememberinghisorherlogininformation,use
yourlistorthecardstoremindthestudentoftheassignedusernameandpassword.
Playtime
10min.
Allstudentsshouldcompletechallenges2125withatleasttwostars.(Studentsfromthe
ageof12andupshouldgetthreestars.)Usetheteacherdashboardtokeeptrackof
studentsachievements.
Assessment
4min.
Challenge#24isanassessmentchallengethatcoverseverythingyourstudentsrecently
learnedonCodeMonkey.
Practice
2015
CodeMonkeyStudiosltd.
27
Encouragestudentswhofinishearlytoopenskillmodeonthemapandcomplete
unlockedchallenges.
Part3:Debriefing5minutes
Walkthrough
3min.
Openchallenge#25andclicktheresetbuttontoresetthecode.Gooverthecodewith
yourstudents.Readthestatementsaloud,slowlyandclearly.ThisWalkthroughis
intendedtoshowyourstudentshowtoreadcodecorrectly.
Walkyourstudentsthroughtheprocessofidentifyingthe
pattern
ofbananasarrangedin
a
L
shape,andtranslatethatintothesequenceofstatements:
turnleft
step5
turnright
step5
Thenfixtheinsideofthelooptomatchthesequenceofstatementsandhittherunbutton.
Thiswillnotsolvethechallengeastheloopruns3timesinsteadof4.
AskyourstudentshowmanytimesdoestheLpatternrepeatitself?Thesolutionisthe
lasthelpneededinordertosolvethischallengecorrectly,i.e.replacingthe3by4.
2min.
Explain
Imagineyouhadtogiveinstructionstosomebodytofindaplacethatis5blocksdownthe
street.Doyousay:walkablock,thenwalkanotherblock,thenanother,thenanother,and
thenonemore.No.Yousimplysay:walk5blocksdownthestreet.Thatisbecausethe
sameaction
hastobedonemorethanonce.
Remindyourstudentsthatitsthesameincoding.Whenthereisarepeatingpatternof
thingstodo,thenaloopisagoodwaytokeeptheprogramshortandeasytounderstand.
Justfindthepattern,writeitonceandaddthelineofcodethattellsthecomputerhow
manytimestorepeat.
2015
CodeMonkeyStudiosltd.
28
Lesson6Loopon
Challenges2630
Todayyourstudentswillcontinueusingsimpleloops,andwilldeepentheirunderstandingon
whyitisimportanttouseloops.
Objectives
:
Withinthislesson,studentswill:
Understandwhyusingloopsinprogrammingismoreefficient
Understandtheimportanceofusingindentationright
Completechallenges2630onCodeMonkey
Components
:
Orangehighlightoverrunningcode
Part1:Introduction10minutes
Review
5min.
Webeginthislessonwithareviewoftheconceptofloopsandthewaytousethem.
Asktheclass:
Whatisaloop?
Whendoweuseloopsinourcode?
Whatisasyntaxofaloopthatmakesthemonkeywalkintheshapeofasquare?
Howdowetellbetweencodethatsinsidetheloopandcodethatisaftertheloop?
Part2:Part2:LetsGo!30minutes
Login
1min.
AskthestudentstogototheCodeMonkeywebsite(
playcodemonkey.com
)
andloginto
theiraccounts.Ifastudentishavingtroublerememberinghisorherlogininformation,use
yourlistorthecardstoremindthestudentoftheassignedusernameandpassword.
Playtime
2015
CodeMonkeyStudiosltd.
4min.
29
Allstudentsshouldcompletechallenges2630withatleasttwostars.(Studentsfromthe
ageof12andupshouldgetthreestars.)Usetheteacherdashboardtokeeptrackof
studentsachievements.
Themainthingtowatchinthisplaytimesessionistheuseofloops.Mostofthelevels
thatinvolvearepeatingpatterncanbesolvedbyrepeatingthesameorsimilarcode.
However,thismissesthepoint,soyoushouldmakesurethestudentsareactuallyusing
loopsandgettingatleast2stars.
4minutesintotheplaytimesession,usethefollowingwalkthrough:
Walkthrough
5min.
Openchallenge#27.
1. Drawthischallengeonthewhiteboard.Youcanuseashape(smiley,etc.)to
representthemonkey.
2. Askoneofthestudentstodrawonthewhiteboardandguessthepaththatthe
monkeyhastogotogetallthebananas.Theanswershouldbea+shapedpath.
3. Askanotherstudenttotranslatethepathintoasequenceofstepsandturns
withoutloops.Theanswerissomethingsimilartothefollowing(thedirectionright
orleftcanbedifferent).
step10
step10
turnright
step10
step10
turnright
step10
step10
turnright
step10
step10
turnright
4. Theanswermaybelonger,likethefollowing:
step10
turn180
step10
turnright
step10
turn180
step10
turnright
step10
turn180
2015
CodeMonkeyStudiosltd.
30
step10
turnright
step10
step180
step10
turnright
5. Ifso,askthestudenttoimproveitbymakingitshorter.Ahintonhowtodothis
wouldbetowalkbackwards.
6. Askanotherstudenttoidentifytherecurringpattern.Therecurringpatterninthe
exampleaboveis:
step10
step10
turnright
7. Askthestudenttomakethecodeshorterbyusingaloop,expectananswerlike
this:
4.times>
step10
step10
turnright
Playtime
5min.
Thestudentscontinuetheirworkonchallenges2630.
Walkthrough
5min.
Openchallenge#28andclickresettoresetthecode.
Observewithyourstudentsthattheexistingcodewillgothroughthehalfcircleandcollect
allthebananasexceptone.Concludethatthemissinglineofcodetocompletethe
challengeisstep10(userulerifnecessary).
Trytotypestep10andclickruntoseewhathappens.Thisdoesnotsolvethe
challenge(hitstopifthisgoesontoolong).
Observethattheprobleminthissolutionisthatthecomputertakesthestep10asifit
shouldbeexecuted10times
intheloop
,not1time
aftertheloop
.
Gobacktoyourcodeandremovetheindentationbeforethestep10.Nowrunyourcode
again.Showyourstudentsthatthisishowtoruncodeaftertheloop.Remindthemthat
thisiscalled
indentation
.
Playtime
2015
CodeMonkeyStudiosltd.
10min.
31
Thestudentscontinuetheirworkonchallenges2630.
Practice
Encouragestudentswhofinishearlytoopenskillmodeonthemapandcomplete
unlockedchallenges.
Part3:Debriefing5minutes
5min.
Walkthrough
Openchallenge#29andclicktheresetbuttontoresetthecode.Gooverthecodewithyour
students.Readthestatementsaloud,slowlyandclearly.ThisWalkthroughisintendedto
showyourstudentshowtoreadcodecorrectly.
Clickruntorunthecode,anddirectyourstudentsattentiontotheorangehighlightwhich
highlightsthelineofcodethatisbeingprocessedbythecomputeratthatverymoment.
Solvechallenge#29withyourstudents.Youcanalsoopenoneofyourstudentssolutions
anonymouslyusingtheteacherdashboard.
2015
CodeMonkeyStudiosltd.
32
Lesson7Threestarsparty!
Challenges130
Inthislesson,yourstudentswillrevisitchallengestheyhavealreadysolvedbutreceived
onlyoneortwostarsfortheirsolution.Bytheendofthislesson,allofyourstudentsshould
haveperfectthreestarscoresonthefirst30challengesofCodeMonkey.
Objectives
:
Withinthislesson,studentswill:
Revisitchallengeswheretheyreceivedoneortwostars
Solveallchallengeswiththreestars
Part1:Introduction15minutes
Priortoclass
:Checkyourteacherdashboardforchallengeswhereahighnumberof
studentsstruggledtogetthreestars.Usethechallengesbydifficultymetricsinthe
statisticsbarinyourdashboardtoseewhichchallengeswerethehardestforyourstudents,
biggercirclemeansmorestudentsstruggled.
Walkthrough
15min.
Choosetwoorthreechallengesthatgotarelativelyhighnumberofblueorredstars,and
solvethemtogetherinclasswithyourstudents.
Part2:LetsGo!25minutes
Playtime
25min.
AskthestudentstogototheCodeMonkeywebsite(playcodemonkey.com)andloginto
theiraccounts.
Oncetheyareloggedin,instructthemtoclickthemap(upperrightcorner)andfind
challengeswheretheygotoneortwostars.
Attheendofclass,allstudentsshouldaimathavingthreestarsinallthefirst30
CodeMonkeychallenges.
Ifanyofyourstudentsfinishedall30challengeswith3stars,askthemtohelptheirfellow
classmates.
2015
CodeMonkeyStudiosltd.
33
Part3:Debriefing5minutes
Explain
5min.
Discussbrieflywithyourstudentstheimportanceofwritingshortcode.
InCodeMonkey,whenwegettwostars,itmeansthereisashorterwaytoreachthesame
endresult.Eitherwehavelinesofcodethatareunnecessaryforreachingtheendresult,
orthereisashortersolution,likeusingaloop.
Imaginethateverytimeyouwantedtogotoyournextclass,youhadtofirstgohomeand
thencomebackandgototheclassroom.Itdoesntmakeanysensetodothat.Writing
longcodeisthesame.Ifthereisashorterwaytodothesamething,itdoesntmakeany
sensetodoitthelongway.
2015
CodeMonkeyStudiosltd.
34
ReferenceCard
Keyword/Button
Description
Tomakethemonkeysteptoacertaindistance,we
havetowritestepXusingthenumberofstepswewant
himtotake,forexample,step10.
Pressingthe
step
buttonwillwritethewordstepinyourcode.
Turnshouldbeaccompaniedbyadirection(left/right)or
degrees(45,90,180).
Examples
:turnright,turn90
Pressingthe
turn
buttonwillwritethewordturninyour
code.
Leftandrightareusedafterthestatementturnto
makethemonkeyturninthedesireddirection.
Pressingthe
left
or
right
buttonswillwritethewordleft
orrightinyourcodeaccordingly.
turnToisanotherwayofturning.Insteadofusing
directionordegrees,weareaskingthemonkeytoturnto
aspecificobject,forexample,turnTobanana
.
Pressing
the
turnTo
buttonwillwritethewordturnToinyour
code.
Asimpleloopis
asequenceofinstructionsthatrepeatsa
specifiednumberoftimes.
Example
:
2015
CodeMonkeyStudiosltd.
Inthisexample,themonkeywillrepeatstep5,turnleft
threetimes.Theinstructionswewriteintheloopshould
bewrittenunderneathitwithanindentation(....).Youcan
dothatbypressingthe
Tab
keyonthekeyboard.
Pressingthe
times
buttonwillwritethebeginningofa
simpleloopinyourcode:3.times>
.
35
Pressingthe
run
buttonwillmakethecodeontheright
run.Youcanseetheoutcomebylookingatthesceneon
theleft.
Theresetbuttonwilleraseeverythingyouwroteinthe
codeontherightandwillresetthecodetohowitwasat
thebeginningofthechallenge.
Therulerisatooltohelpyoumeasurethedistance
betweendifferentobjectsinthegame,forexample,the
distancebetweenthemonkeyandthebanana.
Theruler
canalsohelpyoumeasureanglesthatthemonkeyor
turtlehastoturninordertofaceanotherobjectonthe
screen,likeabanana.
Tousetheruler,clickitonce,and
thenuseyourmousetomovetherulertothepointyou
wantittostartmeasuringfrom.Clickthemouseagain,
andthendragittotheendpoint.Anumberwillappearat
theendpointtoindicatethedistance.Usethisnumber
withthestepstatement.Anothernumberwillappear
nearthestartingpoint,thisnumberindicatestheangel
fromthefirstobjecttothesecondone,useitwiththe
turnstatement.
Aftereachchallenge,youllreceiveastarratingforyour
solution.
Thestarsaredistributedasso:
Firststarisgivenifyougotallbananas
Secondstarisgivenifyouusedwhatyoulearned
Thirdstarisgivenifyourcodeisshortandtothe
point
2015
CodeMonkeyStudiosltd.
36
CharactersReview
Character
Description
Gordo,namedafterthefirstapeinspace,istheguide
whowillhelpyouandgiveyouinstructionsalongtheway.
Hisremarksarebothfunnyandhelpful.Youcanalways
clickhimtorereadtheinstructions.
Themonkeyisthemaincharacter.Youwillhavetohelp
himcollectbananasbywritinglinesofcode.Justsoyou
know,monkeysdontliketogetwet,andtheyarevery
friendly.
Inchallenge#13,youwillmeetourtrustyturtle.Theturtle
willhelpyougetthosesneakybananas.Inorderto
instructtheturtletoturnorstep,wehavetoclickit
first.Thiswillwriteitsnameinthecode,andthen
separateitfromtheactionwewantittotakeusingadot
(.)
.
Example
:
2015
CodeMonkeyStudiosltd.
37
Support
Needextrahelp?
Youcancontactusvia
email:i
nfo@cm
studios.com.
twitter:
www.twitter.com/codemonkeystu
facebook:
www.facebook.com/codemonkeystu
2015
CodeMonkeyStudiosltd.
38