Scratch and Python Comparison | Coding Classes for Kids
文章推薦指數: 80 %
Block-based coding involves dragging-and-dropping “blocks” of code to form valid and meaningful instructions to bring about the desired outcomes ... About About MeettheTeam FAQ WhyUs WhyUs Compare Students'Achievements OurCurriculum CodingMastery(WeeklyClasses) On-Premise&OnlineLessonsAvailable ClassSchedule Pricing FreeProjects ContactUs WegetlotsofquestionsaroundthemeritsofusingScratchvs.goingstraightintoPython.AtCodeNinja,ourcurriculumhas5levelsofwhich,thefirst3focusonteachingthefundamentalsofcodingusingScratch,ablockbasecodinglanguage. ThisarticleoutlinesthebenefitsofstartingnewlearnersonblockbasedcodinglanguageslikeScratchtoacceleratetheirlearningjourneyandinterest.Pleasereachoutforquestions.Enjoy! Block-basecodingBlock-basedprogrammingenvironmentssuchasScratch,micro:bit,andLegoMindstorms&WeDohavebecomepopularasintroductorytoolsforlearningcoding.Block-basedcodingplatformsareverypopularamongchildrenages8to16,partlybecausetheyofferaprogramminglanguagethatislessintimidatingthanatext-basedlanguagesuchasJavascriptorPython. Block-basedcodinginvolvesdragging-and-dropping“blocks”ofcodetoformvalidandmeaningfulinstructionstobringaboutthedesiredoutcomes.Theseblocksdifferinshapeandcolourtoprovidecuesabouthowinstructionscanbeassembledandtodifferentiatebetweentypesofblocksandprogrammingconcepts.Theycanbelikenedtojigsawpuzzlesorlegoblocksthatcanbeassembledincertainrules-specificwaystocreateaprogram. AScratchblockthatgeneratesthefirst100Fibonaccinumbers. Viewfullsize APythoncodethatcalculatesthefirst100Fibonaccinumbers. Viewfullsize ObstaclesfacedbynewcodersItiswidelyacknowledgedthatprogrammingisdifficulttolearn.Newlearnersoftenhavedifficultyinbasicprogrammingtaskssuchaspredictingtheoutputofcode,identifyingthecorrectorderofcommands,andbreakingdownaseriesofinstructionstocarryoutatask. Manyofthesetasksarechallengingfornewlearnersbecause:thelearnersarerequiredtothinkaboutsolutionsinawaythatisnotnaturaltothem.towriteasimpleprogram,theyarerequiredtounderstandboththesyntaxandlogicofaprogramminglanguage. introductoryprogrammingtasksoftenfailtoconnectwiththeinterestsofstudentsandareperceivedtobe“boring”. CodingSyntaxInprogramming,syntaxreferstotherulesthatspecifythecorrectcombinedsequenceofsymbolsandlettersthatallowsaprogramminglanguagetogiveinstructionstocomputers.Computers,beingtheinflexiblemachinesthattheyare,understandwhatyouwant,onlyifyoutypeitintheexactformthatthecomputerexpects.Thatformisthesyntax. Learningtoprogramwithatext-basedlanguagecanbequitefrustratingandrequiresalotofattentiontodetails.Programminglanguagesareveryunforgivingonsimplemistakes,andthereisanoverwhelmingamountofsyntaxthatcangowrong:opening/-closingbrackets,upper/lowercaseletters,semicolons,andalsospelling.Atinydotoraspacecharacter(orthelackofone)inthewrongplace,willcauseyourprogramtocompletelybreakdown. MostEnglishspeakerscanlookpastafewsyntaxerrors,andcanenjoythepoetryofe.e.cummingswithoutproblems. icarryyourheartwithme(icarryitinmyheart)iamneverwithoutit(anywhereigoyougo,mydear;andwhateverisdonebyonlymeisyourdoing,mydarling) ifearnofate(foryouaremyfate,mysweet)iwantnoworld(forbeautifulyouaremyworld,mytrue)andit’syouarewhateveramoonhasalwaysmeantandwhateverasunwillalwayssingisyou —from“[icarryyourheartwithme(icarryitin]” Cummings'workisassociatedwithmodernistfree-formpoetrywithaparticularidiosyncrasyofsyntax. Mosttext-basedprogramminglanguagesarenotsoforgiving.Ifthereisasinglesyntaxerroranywhereinyourprogram,youwillnotbeabletocompletetheexecutionofyourprogram.Youcanexpecttospendalotofyourcodingcareertrackingdownsyntaxerrors. Forexamplethereareatleastthreesyntaxerrorsinthecodeontheleft. Name=input("Whatisyourname?")age=input("Whatisyourage?")print"Hello,"+name+ "+age) name=input("Whatisyourname?")age=input("Whatisyourage?")print("Hello,"+forename+""+age) Novicescanspendthefirstfewweeksorevenmonthshuntingdownastraysemicolonoradoublespace,insteadoffocusingonsolvingcomputationalproblemsanddevelopinghigherthinkingskills.Thisoftenresultsinlostinterestandtheconclusionthatcodingis“boring”.Amajoradvantageofblock-basedcodingenvironmentsistheeliminationofsyntaxerrors.Thedrag-and-dropinterfaceallowsforblocksofcodetobeplacedonthescreentoformsyntacticallycorrectprograms,withouttheuseoftyping.Iftwoblockscannotbejoinedtoproduceavalidstatement,thentheenvironmentpreventsthemfromsnappingtogether. Intheseways,block-basedprogrammingcanpreventsyntaxerrorswhilestillretainingthepracticeofdesigningprogramsbyassemblingstatementsone-by-one.Novicesareabletofocusonthecoreconceptsincomputersciencesuchasprogramcontrol,conditionalsandloops,withoutthefrustrationofcorrectingsyntaxerror. LowerBarrierofEntryWritingaprograminsuchaBlock-basedcodingenvironmenttakestheformofdragging-and-droppingprogramminginstructionswhichsnapstogether.Scratchusesitsblock-likestructure,withdifferentcolourandshape,andasimplified“natural”languagetoprovidecuesaboutwhatblockscanbeconnectedtoformasyntacticallycorrectprogram.Forexample,blocksthatacceptBooleanvaluesarehexagonalshaped,whileblocksthatacceptnumericalvaluesareovalshaped.ControlstructuresareC-shapedtoindicatethatotherblockscanbeplacedinsideofthem.Thevisuallayoutallowsnovicestoseetheorderandflowofaprogramclearly. DifferentcoloursandshapeshelpdifferentiatethedifferenttypesofcodingblocksinScratch. SuchBlock-basedprogrammingenvironmentshavebeendesignedforchildrenasyoungasfiveyearsoldbutalthoughmostenvironmentsaredesignedforlearnersages8to16. EncouragesexperimentationandcreativityScratchwasdesignedtocreatevideogamesandstories.Inshort,studentswillenjoymakingtheprojectsaswellasplayingthem.Userscanusetheirownimages,musicandvoicerecordings.Itisanetworked,media-richprogrammingenvironmentwhichfosterscreativeandpersonalisedprojects. Comparedtotext-basedcodingplatforms,wherenovicesarestuckwithmakingtext-basedprograms,becauseatthestart,theyarethemostachievabletypeofprogramstocreate.Itisusuallyreallyhardtocreateniceanimationsandgraphicsusingtext-basedlanguages.Insomecases,itrequiressomeadvancedmathematicalconcepts.Moreover,Scratchencouragesuserstobesocialbyallowinguserstosharetheirprojectswiththecommunityandbuildontheprojectsofothers.Theycanalsoreceivefeedbackandthanksontheirprojectsfromotherprogrammers.Thiscreatesadditionalmotivationtoworkonandcompleteaproject. AdvantagesofBlock-basedlanguagesInsummary,thebenefitsofblock-basedcodingandwhyit’sagoodtoolfornewlearners: Lowfrustration–Withblock-basedcoding,there’salackofsyntaxerrorsthatcomewithtext-basedprogramming.Experimentationandlearning–thelowbarrierofblock-basedcodingmakesiteasyfornovicestoexperimentandtryoutuniquesolutions. Interest-Theenvironmentsencouragenoviceprogrammersbyallowingthemtocreatepersonalisedmedia-richgamesandprojectsthatarerelatedtotheirowninterests. Withallitscolourandblocks,itiseasytoassumethatScratchis“easy”andforkids.Thatcouldn'tbefurtherawayfromthetruth!Scratchcanbeusedtodoalotofreallyhardandreallycomplexprograms.Itisaveryrealprogramminglanguageandit’sagreatwaytogetafirmfoundationinprogrammingwithouthavingtoworryaboutdebuggingeverysinglelineofcode.Infact,it’showmanymajoruniversities,likeHarvardandBerkeley,teachcodingintheirIntrotoComputerScienceclasses.TLDR:WhyTopUniversitiesTeachDragandDropProgramming? MingDe Author ResearchedandwrittenbyourinstructorMingDe.ContactustolearnhowScratchisusedtopromoteactivethinkinginhisZoomandin-personclassesforSingaporeandoverseasstudents. MingDeYuen WhyTopUniversitiesTeachDragandDropProgramming? TicTokClock FAQ|ClassSchedule|Pricing22HavelockRoad,01-689,Singapore160022(65)[email protected] ©Copyright2020.AllRightsReserved.
延伸文章資訊
- 1Blocks to python with Edublocks - YouTube
- 2From Blocks to Code with Trinket! - An Hour of Python
Starting with Blocks, we look at the code underneath and learn some basics of Python! Let's Go! S...
- 3EduBlocks
Blocks to Text Programming made easy. EduBlocks is a free tool that helps anyone learn how to cod...
- 4Blockly | Google Developers
The Blockly library adds an editor to your app that represents coding concepts as interlocking bl...
- 5Code block - Python - Mimo
If statements don't decide on skipping or running the entire code. They only make decisions about...