HomePythonGeneral
Python · General

Python From Scratch Lesson 12 PDF (Python Functions Lambda)

Cby Connect 4 Techs·4 Jun 2023·1,821 downloads Free PDF

Welcome to the twelfth lesson of the Python From Scratch series! In this lesson, we will be exploring one of the most powerful concepts in programming functions. Functions are blocks of reusable code that can be called from anywhere in a program, making them incredibly useful for

Welcome to the twelfth lesson of the “Python From Scratch” series! In this lesson, we will be exploring one of the most powerful concepts in programming – functions. Functions are blocks of reusable code that can be called from anywhere in a program, making them incredibly useful for organizing code and reducing redundancy.

We will begin by learning the basics of functions, including how to create them, pass arguments, and return values. We will also cover more advanced topics, such as default arguments, variable-length argument lists, and recursion. In addition to regular functions, we will also explore lambda functions, which are a type of anonymous function that can be created on the fly and used in a variety of contexts.

Throughout this lesson, we will be building on the knowledge and skills that we have developed in previous lessons, so it is recommended that you have a solid understanding of Python fundamentals before diving into this one. However, even if you are new to Python, you should be able to follow along with the examples and exercises provided.

Overview about Our Python Lesson 12

Python Functions & Lambda Six pages of summary in PDF format to start learning the Python language with a series of lessons that we will complete together to master the Python language

By the end of this lesson, you will have a solid understanding of how to use functions and lambda functions in Python and how to incorporate them into your own programs. So, let’s get started!

Lesson Content

  • Python Functions
    • Creating a Function
    • Calling a Function
    • Arguments
    • Parameters or Arguments?
    • Number of Arguments
    • Arbitrary Arguments, *args
    • Keyword Arguments
    • Arbitrary Keyword Arguments,
       **kwargs
    • Default Parameter Value
    • Passing a List as an Argument
    • Return Values
    • The pass Statement
    • Recursion
    • Python – Functions Exercises
  • Python Lambda
    • Syntax
    • Why Use Lambda Functions?
    • Python – Lambda Exercises

Lesson Format

PDF

Preview pages

4
8
12
16
20
24
Download

Ready to start reading?

Free PDF · hosted on Google Drive