Assessment Tool

Lecture 10:  Loops

Content Tested:  Applications and Choice of Loops

Lecture Content:

Goals:

Assessment Technique:  Application Cards

Purpose:

Instructors can find out how well students understand possible applications of what they have learned.

Activity:

Say the following to the students:


We have seen how to write "for" and "while" loops in lecture.  State one or more applications where you see loops in gadgets, appliances, software, or a task.  Also, state the application of the tool and what type of loop you think this tool uses.  Why did you decide on a "for" loop or a "while" loop?

Students may need to see some examples before thinking of an application on their own.  Here are examples of possible applications:

cooking/kitchen timer
application:  counts down to zero from a time given by user and beeps/buzzes when time has expired
type of loop:  "for", given a time, there are a set number of times the loop which counts down the time will execute

printing a search engine results list
application: list the "hits" found that match key words
type of loop: "for" if the engine looks through entire database or web and then prints out a list of "hits".  This printing is the action executed each time through the loop; "while" if the engine prints results as they are found since the engine doesn't know in advance how many listings should be printed.

A parent packing lunches for his/her family
application:  Each lunch gets a sandwich, fruit, and beverage
type of loop: "for" since the parent packs a lunch for each member of the family.  The number of members in the family is known.  The body of the loop contains the actions of packing a sandwich, fruit, and beverage in each lunch.

Possible Uses of Activity: