Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Create a function checklist for later exercises.

Write these checks on an index


card and keep it by you while you complete the rest of these exercises or until
you feel you do not need the index card anymore:
Did you start your function definition with def?
Does your function name have only characters and _ (underscore) characters?
Did you put an open parenthesis ( right after the function name?
Did you put your arguments after the parenthesis ( separarghdhdsis separated by
commas?
Did you end the function call with a ) character?
y if-statement must have an else.
2]If this else should never run because it doesn't make sense, then you must use
a die function
in the else that prints out an error message and dies, just like we did in the l
ast exercise.
This will find many errors.
3]Never nest if-statements more than two deep and always try to do them one deep
.
4]Treat if-statements like paragraphs, where each if-elif-else grouping is like
a set of sentences.
Put blank lines before and after.
5}Your boolean te

You might also like