Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

#32 Python Tutorial for Beginners | Functions in Python

Автор: Telusko

Загружено: 2018-07-27

Просмотров: 1123195

Описание:

Check out our courses:

Java Spring Boot AI Live Course: https://go.telusko.com/JavaSpringBootAI
Coupon: TELUSKO20 (20% Discount)

AI Powered DevOps with AWS - Live Course :- https://go.telusko.com/AIDevOps-AWS
Coupon: TELUSKO20 (20% Discount)

Master Java Spring Development : https://go.telusko.com/masterjava
Coupon: TELUSKO20 (20% Discount)

For More Queries WhatsApp or Call on : +919008963671

website : https://courses.telusko.com/


Udemy Courses:

Spring: https://go.telusko.com/udemyteluskosp...
Java:- https://go.telusko.com/udemyteluskojava
Java Spring:- https://go.telusko.com/Udemyjavaspring
Java For Programmers:- https://go.telusko.com/javaProgrammers
Python : https://go.telusko.com/udemyteluskopy...
Git : https://go.telusko.com/udemyteluskogit
Docker : https://go.telusko.com/udemyteluskodo...

Instagram :   / navinreddyofficial  
Linkedin :   / navinreddy20  
TELUSKO Android App : https://go.telusko.com/TELUSKOAPP
TELUSKO IOS App : https://apple.co/3SsgmU2
Discord :   / discord  

In this lecture we are discussing:
#1 What are functions?
#2 Arguments in function
#3 return statement in python

#1
-- A function is a block of code that performs a specific task.
-- Functions are used to break down larger programs into smaller and more manageable chunks,
making it easier to read, test, and debug code.
-- Functions can take input arguments, perform operations on them, and return output values.
-- To define a function in Python, you use the def keyword followed by the function name,
input parameters (if any), and a colon. The function body is then indented and contains the code to be executed.

Here's an example of a simple Python function that takes two arguments and returns their sum:
def add_numbers(a, b):
sum = a + b
return sum

add_numbers(4,5) # calling the function
without calling the function cannot run

#2
Arguments in python
-- whatever variable is used inside a function during the defining of the function is called a formal argument.
-- whatever value you passed during the calling is called actual arguments.


#3
-- The return statement is used to exit a function and return a value.
-- The return statement can be used to return a value from a function.
-- The return statement can also be used to exit a function without returning a value.
-- If the return statement is without any expression, then the special value None is returned.
-- Functions without a return statement return None as their result.
def add_sub(x,y):
c = x+y
d = x-y
return c,d

result1,result2 = add_sub(4,5)
print(result1,result2)

The above code defines a Python function called add_sub that takes two input arguments x and y. The function first adds x and y and stores the result in a variable called c. It then subtracts y from x and stores the result in a variable called d. Finally, it returns both c and d as a tuple.


The function can be called with two arguments, as shown in the line result1,result2 = add_sub(4,5). This line assigns the values returned by the add_sub function to the variables result1 and result2, respectively. The print statement then outputs the values of result1 and result2 to the console.

Github :- https://github.com/navinreddy20/Python-

Python for Beginners :- http://bit.ly/3JOLQhl


Java:- https://bit.ly/JavaUdemyTelusko
Spring:- https://bit.ly/SpringUdemyTelusko

More Learning :

Java :- https://bit.ly/3x6rr0N
Python :- https://bit.ly/3GRc7JX
Django :- https://bit.ly/3MmoJK6

JavaScript :- https://bit.ly/3tiAlHo
Node JS :- https://bit.ly/3GT4liq

Rest Api :-https://bit.ly/3MjhZwt
Servlet :- https://bit.ly/3Q7eA7k
Spring Framework :- https://bit.ly/3xi7buh
Design Patterns in Java :- https://bit.ly/3MocXiq
Docker :- https://bit.ly/3xjWzLA

Blockchain Tutorial :- https://bit.ly/3NSbOkc
Corda Tutorial:- https://bit.ly/3thbUKa
Hyperledger Fabric :- https://bit.ly/38RZCRB

NoSQL Tutorial :- https://bit.ly/3aJpRuc
Mysql Tutorial :- https://bit.ly/3thpr4L

Data Structures using Java :- https://bit.ly/3MuJa7S
Git Tutorial :- https://bit.ly/3NXyCPu

Donation:
PayPal Id : navinreddy20
https://www.telusko.com

#32 Python Tutorial for Beginners | Functions in Python

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

#33 Учебник Python для начинающих | Аргументы функций в Python

#33 Учебник Python для начинающих | Аргументы функций в Python

Декораторы Python — наглядное объяснение

Декораторы Python — наглядное объяснение

Python Functions - Visually Explained

Python Functions - Visually Explained

10 Important Python Concepts In 20 Minutes

10 Important Python Concepts In 20 Minutes

Уроки Python с нуля / #7 – Списки (list). Функции и их методы

Уроки Python с нуля / #7 – Списки (list). Функции и их методы

#31 Учебник Python для начинающих | Работа с матрицей в Python

#31 Учебник Python для начинающих | Работа с матрицей в Python

Python for Beginners (Full Course) | Programming Tutorial

Python for Beginners (Full Course) | Programming Tutorial

Весь синтаксис Python за 25 минут – Учебное пособие

Весь синтаксис Python за 25 минут – Учебное пособие

Как бы я БЫСТРО выучил Python (если бы мог начать заново)

Как бы я БЫСТРО выучил Python (если бы мог начать заново)

Python if __name__ == '__main__': наглядное объяснение

Python if __name__ == '__main__': наглядное объяснение

Making a Game in Python with No Experience

Making a Game in Python with No Experience

Please Master This MAGIC Python Feature... 🪄

Please Master This MAGIC Python Feature... 🪄

Making the Same Game in Python, Lua, and JavaScript

Making the Same Game in Python, Lua, and JavaScript

#34 Учебник Python для начинающих | Типы аргументов в Python

#34 Учебник Python для начинающих | Типы аргументов в Python

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Но что такое нейронная сеть? | Глава 1. Глубокое обучение

Python Functions | Python Tutorial for Absolute Beginners #1

Python Functions | Python Tutorial for Absolute Beginners #1

Как бы я БЫСТРО выучил Python (если бы мог начать заново)

Как бы я БЫСТРО выучил Python (если бы мог начать заново)

Python Dictionaries - Visually Explained

Python Dictionaries - Visually Explained

#20 Учебник Python для начинающих | Цикл While в Python

#20 Учебник Python для начинающих | Цикл While в Python

Как использовать функции в Python (Урок Python №3)

Как использовать функции в Python (Урок Python №3)

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]