Functions in Python in English | Lecture 11 | Mayank Gupta

Опубликовано: 15 Март 2026
на канале: Code House
123
7

This Python Tutorial in English by Mayank Gupta will teach you Array and List in Python, Various functions in list.

Today's Subtopics :
1. For Loop (Extra)
2. What is Function?
3. Use of def keyword.
4. Calling of Function
5. Parameters
6. Return
7. Local and Global variable
8. Test Your skills

1. For Loop (Extra)
For loop is used to iterate over a sequence. And sequence can be a String, List, etc.

2. What is Function?
A function is a block of code which only runs when it is called, it returns data as a result.
You can pass data, known as parameters, into a function.

3. Use of def keyword.
def keyword is used used to create a function.

4. Calling of Function
Calling a function means to execute the block of code of function.

5. Parameters
When we pass some data into a function, then we call it as parameter.

6. Return
return statement passes back an expression or a value to the caller.

7. Local and Global variable
Variables defined inside any function is called Local variable. Local variables can be accessed only inside the function in which they are declared.
Whereas global variables can be accessed throughout the program body by all functions.

8. Test Your skills
def books(title=”Equality”,pages=250):
print(“Title -“,title)
print(“No of pages -“,pages)
books(“You are my Best friend“,156)
books(“How to be rich“)

Please Like, Comment, Share and Subscribe to my Channel.
My profile : https://www.xsonic.in/profile/

Thank You
Mayank Gupta