{"id":584,"date":"2010-09-05T15:16:42","date_gmt":"2010-09-05T20:16:42","guid":{"rendered":"http:\/\/www.apluscompsci.com\/blog\/?p=584"},"modified":"2010-09-06T13:42:30","modified_gmt":"2010-09-06T18:42:30","slug":"teaching-ap-concepts-in-scratch-searching","status":"publish","type":"post","link":"https:\/\/www.apluscompsci.com\/blog\/teaching-ap-concepts-in-scratch-searching\/","title":{"rendered":"Teaching AP Concepts in Scratch &#8211; Vol II &#8211; Searching"},"content":{"rendered":"<p>A typical linear search algorithm consists of some variables, an  if-statement, some type of loop, and of course a list.\u00a0 The search may  be examining the list and looking for a specific value or some type of  thing, like a specific type of creature, the prettiest princess, or an  animal in a game.\u00a0 I do not write games about pretty princesses, but I  do have students that like to do that.<\/p>\n<p>The AP A exam tests a  student\u2019s ability to solve problems and formulate algorithms.\u00a0 The exam  does use Java as a testing vehicle, but does not test specific syntax  details of the Java language.\u00a0 First and foremost, the AP A exam is  focused on testing a student\u2019s problem-solving ability.\u00a0 Searching a  list requires a certain amount of problem solving ability at a very  basic level.<\/p>\n<p>Searching through a list for something is a very  important Computer Science concept and one that is tested on the AP A  exam.\u00a0 Typically, the AP exam free response will ask a student to write  an algorithm to search a list for something.\u00a0 The multiple choice  component of the test usually contains a question or two focused on  searching as well.\u00a0 Students need to understand this concept very well.<\/p>\n<div id=\"attachment_585\" style=\"width: 505px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.apluscompsci.com\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-585\" class=\"size-full wp-image-585\" title=\"findItMethod\" src=\"http:\/\/www.apluscompsci.com\/blog\/wp-content\/uploads\/2010\/09\/findItMethod.png\" alt=\"Searching in Scratch and in Java.\" width=\"495\" height=\"602\" srcset=\"https:\/\/www.apluscompsci.com\/blog\/apluscom\/apluscompsci.com\/blog\/wp-content\/uploads\/2010\/09\/findItMethod.png 495w, https:\/\/www.apluscompsci.com\/blog\/apluscom\/apluscompsci.com\/blog\/wp-content\/uploads\/2010\/09\/findItMethod-246x300.png 246w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/a><p id=\"caption-attachment-585\" class=\"wp-caption-text\">Searching in Scratch and in Java.<\/p><\/div>\n<p>Writing  a search in Scratch is relatively the same as writing a search in any  language or environment.\u00a0 Students still have to combine some variables,  a loop, and an if-statement together to process a list in order to solve the problem.\u00a0 The main benefit of  doing this in Scratch first is that students can just focus on the  problem as they have to spend considerably less time on the details of  typing in all of the pieces.\u00a0 Scratch does not require that students  focus on syntax details so students can concentrate solely on how to  solve the problem.\u00a0 After mastering the concept in Scratch, it will be  much easier to crank out a solution in a text-based language like  Python, Scala, PHP, Ruby, or even Java.<\/p>\n<p><a href=\"http:\/\/www.scala-lang.org\/\">Scala<\/a> is a pretty slick language by the way.\u00a0 A good friend at Rice University suggested I check it out.\u00a0 It is pretty cool.<\/p>\n<p>Using <a href=\"http:\/\/byob.berkeley.edu\/\">Scratch BYOB<\/a> makes creating a search in Scratch a bit slicker as you can create your own blocks and pass parameters.\u00a0 This adds in a bit of abstraction that you do not have in the non-BYOB version of Scratch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A typical linear search algorithm consists of some variables, an if-statement, some type of loop, and of course a list.\u00a0 The search may be examining the list and looking for a specific value or some type of thing, like a specific type of creature, the prettiest princess, or an animal in a game.\u00a0 I do [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[22,23,31,30],"_links":{"self":[{"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/posts\/584"}],"collection":[{"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/comments?post=584"}],"version-history":[{"count":5,"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/posts\/584\/revisions"}],"predecessor-version":[{"id":592,"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/posts\/584\/revisions\/592"}],"wp:attachment":[{"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/media?parent=584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/categories?post=584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.apluscompsci.com\/blog\/wp-json\/wp\/v2\/tags?post=584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}