Functions

Last updated

What is Functions?

In programming, a function is a reusable block of code that executes a certain functionality when it is called. Functions are integral parts of every programming language because they help make your code more modular and reusable. In Python, we define a function with the def keyword, then write the function identifier (name) followed by parentheses and a colon.

Free resources to learn Functions

More in stage 1: Learn the Basics

Functions: common questions

Can I learn Functions in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Functions in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Functions tutorial for beginners?

It is lesson 7 of 85 in the free Python roadmap, in stage 1, Learn the Basics. If you are new to Python, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me