80 likes | 211 Views
COMP 110 Even more even more loops and stuff. Luv Kohli September 19, 2008 MWF 2-2:50 pm Sitterson 014. Announcements. Lab 3 due Hand in your printed out modifyFace() method Interesting talk on Monday at 4pm, SN011
E N D
COMP 110Even more even more loops and stuff Luv Kohli September 19, 2008 MWF 2-2:50 pm Sitterson 014
Announcements • Lab 3 due • Hand in your printed out modifyFace() method • Interesting talk on Monday at 4pm, SN011 • William Swartout, “Toward the Holodeck: Integrating Graphics, Artificial Intelligence, Entertainment and Learning” • Arrr! Today be Talk Like a Pirate Day!
Questions? • How is Program 2 coming along?
Today in COMP 110 • Lab 4 assigned • Help with Program 2 if you need it
Review: Types of Loops • while • Safest choice • Not always most elegant • do-while • Loop iterates AT LEAST once • for • Similar to while, but often more convenient syntax
How do you decide which loop to use? Which kind of loop would you use for each of these scenarios? • “Are we there yet?” loop • Crazy driver loop • Candy loop
Monday • Finish up loops • Review strings and loops