Reusing code with functions Flashcards
1
Q
How do we start grouping related code?
A
By adding 🔸def🔸 keyword
2
Q
How do we name a function?
A
By using snake case
3
Q
What does the 🔸:🔸 do?
A
Mark the beginning of a function’s code block
4
Q
Where does the code we want to group together go?
A
After the function definition, indented by two spaces
5
Q
How do we run the code inside a function?
A
By calling it