Computer Science 131
Introduction To Computing

Dickinson College
Fall Semester 1997
Grant Braught

Food For Thought

Unit 3:
• Can you think of situations were you use loops in your everyday thinking?
Section 3.1:

Exercise 43:
• How many times would your name print out if you used the for loop:
for i in [-5..5]?
• Why does this work but for i in [1..-5] doesn't?
Exercise 44:
• Can you hvae the loop in part a print out:
Pass 20
Pass 21
...
Pass 25

by chaning what is inside the [ ] of the for loop?
Exercise 45:
• Can you have the wedgie from part d print upside down? I.e. Print the row with height o's in it first and the row with 1 o in it last?
Section 3.2:

Exercise 50:
• In part a will the procedure points ever fill in the entire rectangle? If you how many passes through your loop do you think it would take? Does it depend on the size of the rectangle? Explain?
Section 3.3:

Exercise 53:
• Is it possible to watch more than one variable at a time?
• Is it possible to watch combinations of variables like i+j, or i-2? Could this ever be useful?