-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex18_studrill.txt
More file actions
18 lines (18 loc) · 1.41 KB
/
ex18_studrill.txt
File metadata and controls
18 lines (18 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Study Drills
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:
1. Did you start your function definition with def? Yes, i did.
2. Does your function name have only characters and _ (underscore) characters? It does.
3. Did you put an open parenthesis right after the function name? I did.
4. Did you put your arguments after the parenthesis separated by commas? Yup.
5. Did you make each argument unique (meaning no duplicated names)? Yes, I did.
6. Did you put a close parenthesis and a colon after the arguments? Yes.
7. Did you indent all lines of code you want in the function four spaces? No more, no less.
8. Did you “end” your function by going back to writing with no indent (dedenting, we call it)? Yes for the print function
When you run (“use” or “call”) a function, check these things:
1. Did you call/use/run this function by typing its name? Yes
2. Did you put the ( character after the name to run it? Yes, I did.
3. Did you put the values you want into the parentheses separated by commas? Yes
4. Did you end the function call with a ) character? Yups
Use these two checklists on the remaining lessons until you do not need them anymore.
Finally, repeat this a few times to yourself: To “run,” “call,” or “use” a function each means the same thing.