---
# System prepended metadata

title: 'Chapter 1.1: What are functions in a programming language?'

---

# Chapter 1.1: What are functions in a programming language?
Suppose you have a long recipe for making food. When making the food you use that recipe. The recipe is available on a paper.
Whenever you are making the food, you just read the recipe from the same paper. You don't copy it again on a new paper. You just use the old one and follow the instructions there.

With this analogy, you don't want to repeat the same code again and again, so you just write it once and use it again and again.

```c
myfunction() {

}

myfunction();
myfunction();
```

notes for later:
parameters example for recipes:
```
aloo palak
aloo methi
```

the function has x as an ingredient which can be passed to the function.