Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Passing Data into Python Functions

via CodeSignal

Overview

Add parameters to Python functions and pass arguments by position, by name, and with defaults so one definition can handle many inputs.

Syllabus

  • Unit 1: Introduction to Function Parameters
    • Observation: Reading a Parameter in Action
    • Parameterizing a Hard-Coded Greeting
    • A Parameterized Function for Numbers
    • Building the announce function
  • Unit 2: Passing Multiple Arguments
    • Reading a Two Parameter Function
    • Adding a Third Parameter
    • Fixing a Swapped Argument Call
    • Combining Two Names Into Greetings
  • Unit 3: Naming Function Arguments
    • Reading Keyword Calls
    • Rewriting Positional Calls as Keyword Calls
    • Repairing a Positional After Keyword
    • Mixed Calls for Two Functions
  • Unit 4: Using Default Arguments
    • Reading a Default in the Header
    • Giving a Parameter a Default
    • Overriding Defaults Two Ways
    • Repairing an Illegal Parameter Order
    • Building a Defaulted Greeting Function

Reviews

Start your review of Passing Data into Python Functions

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.