How to RETURN values in Python functions | The “return” statement in fruitful functions

Опубликовано: 17 Август 2021
на канале: Computer Science Camp
186
7

LINKS TO FULL CONTENT
Full lesson: https://computersciencecamp.com/cours...
Full course: https://computersciencecamp.com/cours...

FULL LESSON DESCRIPTION
In this lesson we’ll increase our ability to communicate data between custom functions and a main program through the use of what we call “fruitful functions”. As a practice problem, we’ll work on an algorithm that translates numbers from decimal to binary (or base 2), as we leverage a fruitful function to pack this functionality. I’ll conclude with some remarks about the lifetime of variables within and across functions – what we call the “scope” of a variable.

FULL LESSON CONTENT
Part 1. Defining fruitful functions
Part 2. Problem: Base conversion
Part 3. Variable scopes