03-sequences - ENG 1D04 Fall 2010 03 Sequences Dr. William...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: ENG 1D04 Fall 2010 03 Sequences Dr. William M. Farmer and Dr. Spencer Smith Faculty of Engineering, McMaster University 29 September 2010 Outline 1. Administrative details. 2. Advice. 3. Review. 4. Sequences 4.1 Strings. 4.2 Lists. 4.3 Files. 5. Alan Turing. 6. Demo. 7. Work plan for next week. W. M. Farmer and S. Smith ENG 1D04 Fall 2010: 03 Sequences 2/19 Administrative Details W. M. Farmer and S. Smith ENG 1D04 Fall 2010: 03 Sequences 3/19 Advice 1. Try to isolate what you dont understand! I Formulate questions to ask in the lectures and tutorials. 2. Develop your programs incrementally! I Implement a part, test it, fix the mistakes that are identified, and then repeat the process with another part. I Dont let bugs accumulate interacting bugs are often extremely difficult to unravel. W. M. Farmer and S. Smith ENG 1D04 Fall 2010: 03 Sequences 4/19 Review 1. Representing number systems on a computer. 2. Ariane 5. 3. Pythons numeric types. 4. Modules in Python. W. M. Farmer and S. Smith ENG 1D04 Fall 2010: 03 Sequences 5/19 Sequences A sequence is a mapping from the natural numbers to some set of values: 7 a 7 a 1 7 a 1 1 7 a 1 2 7 a 2 2 7 a 2 . . . . . . n 7 a n Finite Sequence Infinite Sequence Operations on finite sequences: I The length of a finite sequence. I The concatenation of two finite sequences. I The repetition of a finite sequence. I The i th member of a finite sequence. I The slice of a finite sequence from the i th to the j th member of a finite sequence. W. M. Farmer and S. Smith ENG 1D04 Fall 2010: 03 Sequences 6/19 Sequence Types In Python, a sequence type is a type of values that represent finite sequences. Pythons built-in sequence types include: I str (immutable ASCII strings)....
View Full Document

Page1 / 19

03-sequences - ENG 1D04 Fall 2010 03 Sequences Dr. William...

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

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