Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed Functions, Packing, and Unpacking!
You have completed Functions, Packing, and Unpacking!
Instruction
Functions Recap and Cheat Sheet
What is a Function?
A function is a reusable block of code thatβs given a name. Functions should accomplish one programming task, and do that task very well. They allow us to keep our code clean and DRY - dry meaning "Donβt Repeat Yourself".
How to Write a Function
Functions are notated by the keyword def
, the name of the function, a set of parentheses, and then a colon. After...