Functions in Python: Introduction

Python    |    Beginner
  • 17 videos | 2h 3m 6s
  • Includes Assessment
  • Earns a Badge
Rating 4.6 of 640 users Rating 4.6 of 640 users (640)
Explore how Python facilitates code reuse by using functions in this 17-video course, which shows learners how to define functions, learn passing arguments to functions, and returning values from functions. The functions you will examine change the state of the program, may have side effects, and have observable effects other than their return values. Since functions with side effects are hard to parallelize and use in a distributed environment, you will learn correct ways of returning values from functions. First, you will learn how to invoke functions by using both positional and keyword arguments. You will next work with positional input arguments in custom functions, and learn that these are required arguments, and how to order these arguments to invoke your function. You will next learn to use variable length arguments in defining custom functions. Finally, you will learn how keyword arguments or named arguments are a way to make the intent behind function invocation absolutely explicit, and help prevent bugs in programs that are especially hard to detect.

WHAT YOU WILL LEARN

  • Discover the key concepts covered in this course
    Recall and implement custom functions
    Define, invoke, and name functions
    Recall how functions work as objects
    Define and invoke functions with input arguments
    Reference global variables from within a function
    Recall the characteristics of working with positional arguments
    Return information from functions
    Write functions with multiple return statements
  • Return complex data types from functions
    Specify keyword arguments while invoking functions
    Recall nuances in invoking functions using keyword arguments
    Specify default values for function arguments
    Implement functions with *args variable length positional arguments
    Combine positional and variable length arguments
    Implement functions with **kwargs variable length keyword arguments
    Recall characteristics of functions, input arguments, and return values

IN THIS COURSE

  • 2m 1s
  • 7m 52s
    After completing this video, you will be able to recall and use custom functions. FREE ACCESS
  • Locked
    3.  Working with Functions
    4m 39s
    Find out how to define, invoke, and name functions. FREE ACCESS
  • Locked
    4.  Functions as Objects
    7m 17s
  • Locked
    5.  Input Arguments - Invoking Functions
    7m 11s
    Learn how to define and invoke functions with input arguments. FREE ACCESS
  • Locked
    6.  Input Arguments - Referencing Global Variables
    9m 29s
    To reference global variables from within a function, use the "global" keyword. FREE ACCESS
  • Locked
    7.  Input Arguments - Using Positional Arguments
    8m 26s
    Upon completion of this video, you will be able to recall the characteristics of working with positional arguments. FREE ACCESS
  • Locked
    8.  Return Values - Functions
    8m 34s
    In this video, find out how to get information back from functions. FREE ACCESS
  • Locked
    9.  Return Values - Multi-return Statements
    7m 9s
    Learn how to write functions with multiple return values. FREE ACCESS
  • Locked
    10.  Return Values - Complex Data Types
    9m 42s
    In this video, learn how to return complex data types from functions. FREE ACCESS
  • Locked
    11.  Keyword Arguments - Invoking Functions
    8m 37s
    After completing this video, you will be able to specify keyword arguments when invoking functions. FREE ACCESS
  • Locked
    12.  Keyword Arguments - Nuances
    5m 56s
    Upon completion of this video, you will be able to recall nuances in invoking functions using keyword arguments. FREE ACCESS
  • Locked
    13.  Default Arguments
    9m 23s
    After completing this video, you will be able to specify default values for function arguments. FREE ACCESS
  • Locked
    14.  Variable Length Arguments - *args Variable
    7m 44s
    In this video, you will learn how to implement functions with variable length positional arguments. FREE ACCESS
  • Locked
    15.  Variable Length Arguments - Combinations
    6m 36s
    In this video, you will learn how to combine positional and keyword arguments. FREE ACCESS
  • Locked
    16.  Variable Length Arguments - **kwargs Keyword
    5m 56s
    Find out how to implement functions with variable length keyword arguments. FREE ACCESS
  • Locked
    17.  Exercise: Introduction to Functions in Python
    6m 34s
    After completing this video, you will be able to recall characteristics of functions, input arguments, and return values. FREE ACCESS

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE

Rating 5.0 of 2 users Rating 5.0 of 2 users (2)
Rating 5.0 of 1 users Rating 5.0 of 1 users (1)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.6 of 293 users Rating 4.6 of 293 users (293)
Rating 4.2 of 31 users Rating 4.2 of 31 users (31)
Rating 4.5 of 543 users Rating 4.5 of 543 users (543)