Python Lab

Stage 2 · 30 min · Pro

Functions: default parameters, returning several values

Write your own functions with def, return, default parameters, keyword arguments, returning several values (a tuple) and variable scope.

Objectives

This lesson is for Pro members

Functions break a big program into small, clearly named pieces you can reuse. This is the first step towards writing code like a professional.

See Pro plans Open in the app