FireEdgeX
0

LESSON 05 ยท PYTHON

Functions and parameters

Define a function with def, pass inputs, and return a reusable result.

6 min readIn progress

THE IDEA

Understand the concept

A function begins with def and a name, followed by parameters in parentheses. A return statement gives a result to the caller; without it, a function returns None by default.

WORKED EXAMPLE

See it in context

Example