• 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

Work with sequences

Understanding logic flow

Logic flow is simply a step-by-step set of instructions. Let's understand it a bit more by looking at a set of instructions for feeding a puppy.  🐶

Puppy feeding instructions: 

  1. Locate the bag of puppy food.

  2. Pick up the food bowl from the floor.

  3. Set the food bowl on the counter.

  4. Pick up the bag of dog food.

  5. Open the bag of dog food.

  6. Tilt the bag slowly towards the bowl.

  7. Pour the food into the bowl.

  8. Fill the bowl.

  9. Close the bag.

  10. Put the bag back in its original location.

  11. Put the bowl on the floor.

  12. Watch the puppy eat happily.

Each step is done sequentially, which means one after the other. You can’t do steps 2 and 3 at the same time, for example. Now, take a second look above and see if you can find any steps that are independent. As you know from the video, this means they don’t have to happen at a precise time.

Ready for an answer? Steps 2 & 3 can happen before or after steps 1, 4, or 5.  As long they’re done before step 6, it doesn’t matter where they are in the order of steps. There are a few more independent steps in this sequence.  Do you think you can locate them?

Try it out for yourself!

Did you write a list of steps for making your perfect cup of coffee or tea? Now, go through it and identify which steps are independent.  Can you change the order of your hot beverage-making program?

Summary

  • A logic flow is the order in which steps are completed in a program.

  • Steps are completed sequentially, not simultaneously.

  • Some steps are independent, which means they can be completed in any order.

Example of certificate of achievement
Example of certificate of achievement