Start free

Browse › Introductory Python

Define and Use Functions in Python

Guided

Part of Introductory Python Topic: Programming

Access

StationX Infrastructure Labs — 3 attempts per lab

🔒 Add StationX Infrastructure Labs — $149 / year · 3 attempts per lab

Already have access? Sign in.

New to this? Try a free practice lab — a scripted hacking challenge in your browser, no account needed.

What you'll do

In this lab, you will define functions in an application.

  1. Define a function that calculates the mean of a list of numbers
  2. Define a function that calculates the factorial of a number by using recursion
  3. Calculate the number of possible seats in a room by using the factorial function
  4. Define a function that delegates actions to another function to reduce redundancy Note: Once you begin the lab, you will not be able to pause, save, or exit and then return to your lab
  5. Please ensure that you have set aside enough time to complete the lab before you start
  • ⏱ About 45 minutes
  • Counts towards: Introduction to Python

Roadmaps that use this lab