{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 108HL08 - While Loops Lecture 8 Week 3 CSC108H1S Velian...

This preview shows pages 1–7. Sign up to view the full content.

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

View Full Document

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

View Full Document

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

View Full Document
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

{[ snackBarMessage ]}

### Page1 / 18

108HL08 - While Loops Lecture 8 Week 3 CSC108H1S Velian...

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

View Full Document
Ask a homework question - tutors are online