---
title: Functions
description: Functions are self-contained blocks of code designed to perform specific tasks. Learners will understand how to define parameters, return values, manage scope, and use modular programming principles to write reusable, readable, and maintainable software.
category: programming-tech
subcategory: programming-fundamentals
difficulty: beginner, intermediate, advanced
url: /subject/functions
---

# Functions

Functions are self-contained blocks of code designed to perform specific tasks. Learners will understand how to define parameters, return values, manage scope, and use modular programming principles to write reusable, readable, and maintainable software.

## Available Resources

1 Videos • 2 Books • 2 Courses • 4 Websites

## Courses

### 1. Logic and Set Theory

Learn functions within logic and set theory with this course by Richard Zach. Explore key concepts and principles now!

**Difficulty:** Advanced | **Price:** Free

**Link:** https://logic.stanford.edu/intrologic/secondary/notes/notes.html

**Tags:** logic, set-theory, relations, proofs

### 2. CS50's Introduction to Programming with Python

An introduction to programming using Python, a popular language for general-purpose programming, data science, web programming, and more.

**Difficulty:** Beginner | **Price:** Free

**Link:** https://www.edx.org/learn/python/harvard-university-cs50-s-introduction-to-programming-with-python

**Tags:** python, programming-fundamentals, functions, cs50, harvard

## Websites

### 1. Stanford Encyclopedia of Philosophy - Set Theory

Joan Bagaria's peer-reviewed Stanford Encyclopedia of Philosophy entry surveying modern set theory: the ZFC axioms, ordinals and cardinals, the continuum hypothesis, forcing and independence results, large cardinals, and determinacy. Readers gain a map of the field's central questions and results.

**Difficulty:** Beginner | **Price:** Free

**Link:** https://plato.stanford.edu/entries/set-theory/

**Tags:** set-theory, zfc-axioms, cardinals-and-ordinals, forcing, large-cardinals, philosophy-of-mathematics

### 2. MDN Web Docs - Functions

Mozilla's JavaScript guide chapter on functions: declarations, expressions, scope, closures, arguments, arrow syntax, and recursion. After reading it you can define functions, reason about scope chains, and choose between function forms in real code.

**Difficulty:** Beginner | **Price:** Free

**Link:** https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions

**Tags:** javascript, functions, closures, scope, reference

### 3. Python Official Tutorial - Functions

The Python tutorial's chapter on defining functions: def syntax, default and keyword arguments, arbitrary argument lists, lambda expressions, docstrings, and annotations. Working through it leaves you able to write and call Python functions correctly using the language's own reference wording.

**Difficulty:** Beginner | **Price:** Free

**Link:** https://docs.python.org/3/tutorial/controlflow.html#defining-functions

**Tags:** python, functions, official-docs, syntax, programming-fundamentals

### 4. javascript.info

JavaScript.info is a thorough, beginner-to-advanced JavaScript tutorial site with detailed explanations and practical examples of core concepts, including functions, scope, closures, and async/await. It also covers the DOM, browser APIs, and modern JavaScript features with hands-on code samples.

**Difficulty:** Intermediate | **Language:** English | **Price:** Free

**Link:** https://javascript.info

**Tags:** websites, technology-computer-science, programming-fundamentals

## Videos

### 1. Python Functions Tutorial

Corey Schafer's comprehensive tutorial on Python functions, highly recommended in r/learnprogramming.

**Difficulty:** Beginner | **Price:** Free

**Link:** https://www.youtube.com/watch?v=9Os0o3wzS_I

**Tags:** python, functions, video-tutorial, programming-fundamentals

## Books

### 1. JavaScript: The Definitive Guide

**Author:** David Flanagan

A reference for the JavaScript language covering functions, closures, prototypes, and the DOM, plus an exhaustive API section. This fourth edition documents JavaScript 1.5, so its syntax coverage predates ES6 and modern module practice.

**Difficulty:** Intermediate | **Language:** English | **Price:** Paid

**Link:** https://www.amazon.com/dp/0596000480?tag=edmonddante07-20

**Tags:** books, technology-computer-science, programming-fundamentals

### 2. Learning Python

**Author:** Mark Lutz, David Ascher

An O'Reilly tutorial covering Python types, statements, functions, modules, and classes with exercises after each part. The second edition targets early Python 2, so language details are dated even though the core concepts still hold.

**Difficulty:** Intermediate | **Language:** English | **Price:** Paid

**Link:** https://www.amazon.com/dp/0596002815?tag=edmonddante07-20

**Tags:** books, technology-computer-science, programming-fundamentals

---

*This content is part of Dantes.io - Your Treasure Map to Knowledge*

*Curated by humans at Dantes.io. Personal study use welcome; republishing this curation requires permission (team@dantes.io).*

View this page online: https://dantes.io/subject/functions