• 4 hours
  • Easy

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 6/15/21

Use functions

Black boxes: an everyday reality

What happens when you wake up and press a button or two on your coffee machine?  Coffee is brewed! But how did it work? Again, you really don't have a clue! You only know that it gives you that reviving liquid that you need every morning.

Fancy coffee machine
Fancy coffee machine

What about a washing machine?  Or a car? You use these every day, but do you actually know how these machines make your clothes clean or get you from A to B? Systems like these are called black boxes.

Black boxes are great, because you can ask them to perform a service without needing to understand the details behind how the service actually works!

Try it out for yourself!

  • Write down three things that you interact with on a daily basis even though you cannot explain how they work

  • Pick out the black box functions from this list:

    • a vanilla malt (wait, what?)

    • how I determine my own drivers license number

    • asking Alexa to play some jazz

    • knowing which jeans I'm going to wear tonight

    • writing my own functions

    • the push button start on my car

    • the feeling I get when I look to the west

    • what happens when I swipe left in an app

Summary

  • A black box performs something useful without needing to how it does what it does.

  • We use black box functions regularly in real life and in programming. 

Example of certificate of achievement
Example of certificate of achievement