108HL08 - While Loops Lecture 8, Week 3 January 26, 2011...

Info iconThis preview shows pages 1–7. 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
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: While Loops Lecture 8, Week 3 January 26, 2011 CSC108H1S Velian Pandeliev 1 Wednesday, January 26, 2011 2 Recap of Lecture 7 Wednesday, January 26, 2011 Rules for Writing Docstrings 3 1. Describe precisely what the function does. 2. Do not reveal how the function does it. 3. Make the purpose of every parameter clear. 4. Refer to every parameter by name. 5. Be clear about whether the function returns a value, and if so, what. 6. Explain any conditions that the function assumes are true. 7. Be concise and grammatically correct. 8. Write the docstring as a command rather than a statement Wednesday, January 26, 2011 4 While Loops Wednesday, January 26, 2011 5 I will not cut corners. I will not cut corners. I will not cut corners. I will not cut corners. I will not cut corners. I will not cut corners. I will not cut corners. I will not cut corners. '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' '' Wednesday, January 26, 2011 Repetitive Action 6 With what we know so far, to do what Bart's doing would involve: print "I will not cut corners. I will not cut corners." print "I will not cut corners. I will not cut corners." print "I will not cut corners. I will not cut corners." print "I will not cut corners. I will not cut corners." print "I will not cut corners. I will not cut corners."print "I will not cut corners....
View Full Document

This note was uploaded on 04/25/2011 for the course CSC 108 taught by Professor Gries during the Spring '08 term at University of Toronto- Toronto.

Page1 / 18

108HL08 - While Loops Lecture 8, Week 3 January 26, 2011...

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

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