• $180

Intro Python: Functions

How to write effective functions in Python. This course reviews defining functions, types of parameters, variable scoping, and the use of functions as objects. Includes 4 hours of video and lots of hands-on exercises!

Get this course, and many others, as part of my LernerPython membership, at https://LernerPython.com.

Contents

Introduction

01 Introduction.mov

Section 2: Intro to functions

Functions, part 1 -- Intro to functions.ipynb
02 What are functions?.mov
03 Functions are objects.mp4
04 Defining basic functions.mp4
Preview
05 Functions return None by default.mp4

Section 3: Simple parameters

Functions, part 3 -- Simple parameters.ipynb
06 Return values
07 Returning multiple values
08 Docstrings
Preview
09 Positional arguments
10 Checking argument types
11 Defaults and multiple defaults
12 Exercises 1.mp4
13 Exercise solutions 1.mp4
14 Call by reference, or call by value?.mp4
15 The perils of mutable defaults.mp4

Section 4: Advanced parameters

Functions, part 4 -- Advanced parameters.ipynb
16 *args.mp4
Preview
17 Turning a sequence into arguments.mp4
18 Keyword arguments with *args.mp4
19 Exercises 2.mp4
exercise-2.txt
20 Exercise solutions 2.mp4
21 Positional vs. keyword arguments.mp4
22 **kwargs.mp4
23 Avoiding repeated names.mp4
24 Where do we use **kwargs?.mp4
25 Exercises 3.mp4
exercise-3.txt
26 Exercise solutions 3.mp4
27 Combining argument types.mp4
28 Using ** when invoking functions.mp4
29 Positional-only arguments.mp4

Section 5: Variable scoping

Functions, part 5 -- variable scoping.ipynb
30 Introduction to scoping.mp4
31 Global variables.mp4
32 Global variables from within functions.mp4
33 Local variables.mp4
34 Unbound locals.mp4
35 The "global" declaration.mp4
36 Using __main__ for global variables.mp4
37 Modifying globals .mp4
38 The builtins scope.mp4
39 Exercises 4.mp4
exercise-4.txt
40 Exercise solutions 4.mp4

Section 6: Advanced techniques

Functions, part 6 -- advanced techniques.ipynb
41 Custom sorting.mp4
42 Accepting functions as arguments.mp4
43 Dispatch tables.mp4
44 Exercises 5.mp4
exercise-5.txt
45 Exercise 5 solutions.mp4

Section 7: Conclusion

46 Conclusion.mov

FAQs

Who should take this course?

This course is aimed at people who have a programming background, but are new to Python.  My typical students are people with experience in C, C++, Java, and/or C#.  

The content comes from the four-day "Intro Python" course I teach at companies around the world.  I normally have some students without a strong programming background; many of them are able to get through the course (and enjoy it), but there are those who struggle.

If you aren't sure whether your background is strong enough, just e-mail me, and let's chat about it!

What version of Python do you use?

3.7, although I do briefly mention a new feature in 3.8.  (I didn't have 3.8 running on my computer when producing the course.)  

If you have Python 3.6 or above,then you're fine for this course.

Is there a “trial” version or sample?

No, but (a) you can view a number of the videos for free, without purchasing the course, and (b) I offer a 100% guaranteed refund if you need.  

Is automated testing a part of this course?

No, but I am preparing a separate course on "pytest" that will cover functions (among other topics).

I live in Israel. How do you handle issues like VAT?

If you live in Israel, then please don't buy any of my products (including Weekly Python Exercise) via this online platform. I'm obligated to collect VAT from you, and then to pass it along to the government.  Instead, please e-mail me for information about sending me a bank transfer. I'll then add you to the course, but we'll be able to handle it in the standard and legal way. I apologize for this frustration -- believe me, I wish that the platform I use for selling courses would support Israeli VAT, and I keep asking them to do so.

What if I find that the course is too easy or hard, or that I just dislike your jokes?

If you aren't satisfied with my course, then I'll refund your money.  Just e-mail me.  I believe that I'm offering a high-quality product, but I also know that it's not for everyone.

As for the jokes, people have been trying to help me for years. So far, my jokes have just gotten worse, not better. Oh, well.

I have other questions. What should I do?

Contact me at reuven@lerner.co.il, and let's see what I can do.