element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
microbit
  • Learn
  • Learning Center
  • STEM Academy
  • microbit
  • More
  • Cancel
microbit
Blog Micro:Bit Number Guessing Game / Binary Search
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
microbit requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: dasoussan
  • Date Created: 20 Nov 2018 5:26 PM Date Created
  • Views 239 views
  • Likes 4 likes
  • Comments 4 comments
  • micro:bit education giveaway
Related
Recommended

Micro:Bit Number Guessing Game / Binary Search

dasoussan
dasoussan
20 Nov 2018

I'm one of two volunteer teachers at a nearby Detroit high school and won one of the classroom packs. The Teals idea is to get teachers able to teach CS independently by pairing them up with industry professionals until they can teach CS on their own. This is the 2nd year for the program here in Michigan and this year most of the students are sophomores or juniors with a couple of seniors. Many have never coded before.

 

The TealsK12 curriculum has them coding in Snap! which is a graphic language that runs in the browser much like the micro:bit environment does.

 

That background aside, I wanted to teach at least one “real” computer science type algorithm and the Micro:Bit has become both the platform we will do it on as well as a practical demonstration on how programmers are often required to switch to new languages, environments, platforms, etc. but the base concepts are the same no matter which world you are in.

 

The students should already be familiar with and able to use variables, conditional statements, loops, the basics of input / output and the concept of an algorithm before introducing this lab.

 

We are close to that point now but I’m afraid we won’t be able to do this lab before the deadline given the holiday break.

 

So here is the binary search lab / game submitted for your use / approval! I included a sample solution in script, graphic, text suitable for copy / pasting, as well as a link to the project itself shared for the instructor to reference.

 

If there are any questions, please feel free to email me.

 

Regards,

David Soussan

Attachments:
imageMicroBitIntroCSSyllabusAndBinarySearchLab.docx
  • Sign in to reply
  • dasoussan
    dasoussan over 4 years ago

    I know this is post deadline, but someone might find it helpful.

     

    Day1: Demonstrating Binary Search vs. Sequential Search with the students lined up with numbers on the front / letters on the back. 4 students self-selected to be the letter searcher, taking (high+low)/2 entry and setting their high / low limit accordingly. After they saw how the algorithm worked they were given the lab attached at the beginning.

     

    The students were programming in Snap! (which is a spin-off of Scratch) and I was hoping seeing a different IDE for a different but similar language would give a good map to the real world. I can't count how many development environments I've gone through in my career.

     

    I showed a few of the differences - access to radio, how variables are created and new options appear once the variable exists, how the A+B button doesn't show up on the IDE until it is tested for, etc. Most of the students took to the coding right away. A few needed more hand holding than I'd hoped, but they are the ones struggling with Snap.

     

    Day 2 was all coding, some getting so close calling me over to see it run correctly only to find they weren't really there yet. A few misunderstood and were coding a person guesses number game where the computer chose a number at random - which is a program they did in Snap about 7 weeks ago.

     

    Day 3: Right at the beginning one student was ready to push into a Micro:Bit - by the end of class, 6 out of the 15 or so students present in class were ready. A few took them home to show their parents. At the beginning of class I put some scaffolding code on the board to help the struggling students get up to speed.

     

    The classroom teacher thought it was a great exercise in seeing how programming is the same conceptually even when languages or platforms are different - the knowledge and logic transfer over as do debugging skills.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dasoussan
    dasoussan over 4 years ago

    Today a few students had their code working in the simulator and they pushed them to the Micro:Bits!

     

    image

     

    image

     

    image

     

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • dasoussan
    dasoussan over 4 years ago in reply to neilk

    The students lined up and everyone got a card with a number and letter - then both sequential search was demonstrated along with binary search. Gave out the labs, walked them through some of the development environment, and they are now coding away. Won't be done and installed in the micro:bit before the end of today, but here are some shots of various states of work-in-progress on their binary search game:

    imageimageimageimage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • neilk
    neilk over 4 years ago

    Hi dasoussan - David!

     

    Very nice documentation image. I hope all goes well with the students after the holiday break.

     

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube