Want to create interactive content? It’s easy in Genially!

Get started free

PYTHON FUNCTIONS

Carolina Duarte

Created on October 26, 2021

Start designing with a free template

Discover more than 1500 professional designs like these:

Transcript

COMPUTER SCIENCE 9TH GRADE

PYTHON FUNCTIONS

MILESTONE #2 - ACTIVITY 2

What is a function in Python?

In Python, a function is a group of related statements that performs a specific task. Functions help break our program into smaller and modular chunks. As our program grows larger and larger, functions make it more organized and manageable. Furthermore, it avoids repetition and makes the code reusable.

PYTHON FUNCTION SYNTAX

Function name

def keyword

Indentation

function body

link

Join to the following link and practice doing the proposed exercises.

Practice:

link

Parameters or Arguments?

The terms parameter and argument can be used for the same thing: information that are passed into a function. From a function's perspective: A parameter is the variable listed inside the parentheses in the function definition. An argument is the value that are sent to the function when it is called.

USING ARGUMENTS VIDEO

Bibliography

https://www.w3schools.com/python/python_functions.asphttps://www.programiz.com/python-programming/function https://www.datacamp.com/community/tutorials/functions-python-tutorial https://www.geeksforgeeks.org/python-functions/ https://realpython.com/defining-your-own-python-function/ https://www.youtube.com/watch?v=vg7Hwd9TANY