Function Basics

You've already seen the power of for loop in CodeCraft world, you will be amazed after you understand functions.

Functions are chunks of code that can be reused.

So far you've already seen quite a few Python built-in functions such as print(), range().

We have some basic understanding of functions:

Every function has a name, followed by parentheses ( ). Any input parameters or arguments should be placed within these parentheses. Some functions don't have input arguments so the parentheses are empty.

In order to use the function, we just need to call the function name and provide the required argument values.

results matching ""

    No results matching ""