← Back to CoursesComputer Science: Beginner

Neuroanatomy Explorer

Drag to rotate · scroll to zoom · click regions to explore

View
Loading 3D model…

Click a region
to explore it

Memory Deck

Flip each card and rate whether you knew it. Your score is saved.

Term
Definition

Deck complete — score saved.

Match the Pairs

Match each term to its definition. Finish the board to earn your score.

All matched — score saved.

Concept Constellation

Every key idea in this course, mapped as an explorable 3D constellation. Drag to rotate, scroll to zoom, click a node.

Click a node to read its definition.

Functions and Abstraction

Manual: General · Subject: Computer Science

Learn how functions group instructions into reusable building blocks and simplify programs.

Building with reusable pieces

What is a function?

A function is a named block of code that performs a task. It can take inputs, do work, and often return an output.

🔑

Abstraction

Abstraction means hiding unnecessary detail so we can focus on the important idea. Functions are a powerful form of abstraction.

Why functions help

Functions make programs shorter, easier to read, easier to test, and easier to reuse.

What is one major benefit of a function?

What is abstraction in simple words?

Function vocabulary

Parameter
An input a function accepts
Return value
The result a function gives back
Reusable
Able to be used again in many places
Abstraction
A simplified way to think about something complex

A function that calculates the area of a rectangle is an example of:

Why do programmers use functions instead of repeating code?