Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Function basics
Summary
21. Summary

Instruction

Great! It's time to wrap things up.

  • Functions can be created in the following way:

    def function_name(function_arguments):
      function_body
    
  • Use the return keyword to return a value from a function.
  • You can return None, which indicates that you return nothing.
  • You can provide default values for arguments when you define a function:

    def function_name(arg1, arg2=5):
      ...
  • You can use pass as your function's body to do nothing.

So, are you ready for a short quiz?

Exercise

Click Next exercise to continue.