12.07.2015 Views

Is Python a

Is Python a

Is Python a

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Statement rule special cases 208Block rule special case 209A Quick Example: Interactive Loops 210A Simple Interactive Loop 210Doing Math on User Inputs 211Handling Errors by Testing Inputs 212Handling Errors with try Statements 213Nesting Code Three Levels Deep 214Chapter Summary 215Brain Builder 216Chapter Quiz 216Quiz Answers 21611. Assignment, Expressions, and print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217Assignment Statements 217Assignment Statement Forms 218Sequence Assignments 219Advanced sequence assignment patterns 220Multiple-Target Assignments 222Multiple-target assignment and shared references 222Augmented Assignments 223Augmented assignment and shared references 225Variable Name Rules 225Naming conventions 227Names have no type, but objects do 227Expression Statements 228Expression Statements and In-Place Changes 229print Statements 229The <strong>Python</strong> “Hello World” Program 230Redirecting the Output Stream 231The print >> file Extension 232Chapter Summary 234Brain Builder 235Chapter Quiz 235Quiz Answers 235Table of Contents | xv

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!