lec-10-12

lec-10-12 - 10/12/2009 Announcements Midterm Fri Oct 16...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
10/12/2009 1 ECS10 10/12 Announcements ± Midterm Fri Oct 16 ± Bring books, notes, program printouts ± Bring a Scantron 2000 (buy at bookstore) ± Bring a pencil ± Know what section you are in (day and time) ± Sample midterm on Web page (not on SmartSite) ± Solutions up tonight Today: complex program ± Structure built from loops. ± Control the loops using: ± while statement ± i -eli -else structures if elif else structures ± Boolean expressions ± state variables ± break statement State variable goodInput = False print ('Enter your height.') reply = raw_input('Feet: ') if cc couldBeInt(reply) if cc.couldBeInt(reply): feet = int(reply) goodInput = True ± Keeps track of what is going on. Not an input or output. Often Boolean. Variables - cast of characters goodInput = False print ('Enter your height.') reply = raw_input('Feet: ') if cc.couldBeInt(reply): feet = int(reply) goodInput = True ± reply - string. What the user typed. ± feet - float. Number of feet.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

lec-10-12 - 10/12/2009 Announcements Midterm Fri Oct 16...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online