jlesca / python-functions

First steps using functions in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Functions 🐍

A function is a reusable block of code that executes a certain functionality when it is called.

In Python, you define a function with the def keyword, then write the function identifier (name) followed by parentheses and a colon.

  def my_function():
      # What to make the function do

To call this function, write the name of the function followed by parentheses:

  my_function()
  1. Creating a Function
  2. Arguments in Functions
  3. Default Parameter
  4. Return Values

About

First steps using functions in Python


Languages

Language:Python 100.0%