Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
py-quickstart/docs/functions/user-functions/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
6 lines (4 sloc)
589 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Functions | |
Functions are self contained objects that are used to create code that we often want to reuse. The most arbitrary use of a function is in this code: | |
{{ code_from_file("conditionals/example-1.py", 1, 10, execute=True) }} | |
As you can see, we have created our first function. To create a function you must first use the def keyword followed by the name for the function. The naming conventions for functions are the same as they are for variables. However, it is good practice to have descriptive names for your functions so that you can recognise what they do at a glance. |