SkyAICampus
HomePracticeLearnCode LabFocus
SkyAICampus
PrivacyTermssupport@skyaicampus.com© 2026 SkyAI Campus
Log inSign up

Learn

HomePracticeConcept cardsCode LabSky Tutor

Review

Revise todayMistake notebookProgress

Focus

Campus ForestFocus roomsSquads

Questions or feedback?
support@skyaicampus.com

  1. 1Variables and types
  2. 2Lists and loops
  3. 3Functions
← Python Basics

Lesson 3 of 3

Functions

Watch, read the card, then practise. Defining functions · Parameters and return values · Scope

Video coming soon

The video for this lesson is being recorded.

Meanwhile, the notes below and the 60-second cards cover the same ideas.

Practise this topic
  • Defining functions

    A function is a named block of code you can run again whenever you need it.

    Remember: Defining a function doesn't run it. Calling it does.

  • Parameters and return values

    Parameters pass values into a function; return sends a result back out.

    Remember: print shows a value; return hands it back so you can use it.

  • Scope

    Variables made inside a function exist only inside it. That's called local scope.

    Remember: Prefer returning a value over changing global variables.

Try the example in Code Lab

def greet():
    print("Namaste!")

greet()
greet()
← Lists and loops

In this lesson

  • Defining functions
  • Parameters and return values
  • Scope

Practise this topic

5 questions at your level. The best way to make it stick.

Practise 5 questions