What is Python Functions | EP-43 Python Functions | Functions in Python | Free Python Tutorials

Subscribers:
28,000
Published on ● Video Link: https://www.youtube.com/watch?v=ajMkNIk_igs



Duration: 0:00
85 views
1


What is a Python Function?
"""A function in Python is a reusable block of code that performs a specific task.
It takes input values (arguments) and returns an output value (result).
syntax:
def function_name(parameter):
#statment
return expression"""

Creating a Function in Python
def company():
print("welcome to cybrosys")

Calling a Function in Python
def company():
print("welcome to cybrosys","calling a function")
company()

Python Function with Parameters
"""
A parameter in a function is a variable that receives a value when the function is called.
It acts as a placeholder for the actual data that will be used within the function's code.

syntax:
def function_name(parameter: data_type)- return_type:
body of the function
return expression """
def greet(name , greeting):
"""Greets a person with a customized message."""
print(greeting , name)

greet("Alice" , "Hello")

def add(num1:int , num2:int)- int:
" add two numbers"
num3 = num1 + num2
return num3
num1= int(input("enter the num1"))
num2= int(input("enter the num2"))
num3 =add (num1,num2)
print(num3)

Python Function Arguments
"""An argument is the actual value that is passed to a function when it's called.
It replaces the corresponding parameter in the function's body."""

def even_odd(x):
if(x%2==0):
print("Even number")
else:
print("Odd number")

even_odd(5)
even_odd(2)

#PythonFunctions #LearnPython #PythonTutorial #PythonForBeginners #FreePythonTutorial #PythonProgramming #CodingForBeginners #ProgrammingTips #FunctionsInPython #PythonBasics #Python #Programming #Coding #FreeCourse #TechTutorial

Connect With Us:
—————————————
➡️ Website: https://www.cybrosys.com/
➡️ Email: info@cybrosys.com
➡️ Twitter:   / cybrosys  
➡️ LinkedIn:   / cybrosys  
➡️ Facebook:   / cybrosystechnologies  
➡️ Instagram:   / cybrosystech  
➡️ Pinterest:   / cybrosys  




Other Videos By Cybrosys Technologies


2024-09-30How to Configure Flexible Working Schedule in Odoo 18 Employee | Flexible Working Hours in Odoo 18
2024-09-28How to Manage Post Dated Cheque PDC in Odoo 17 Accounting | Post Dated Cheque Management in Odoo 17
2024-09-28Filters in Odoo 18 Spreadsheets | Odoo 18 Spreadsheets | Odoo 18 New Features | Odoo 18 Release Date
2024-09-27How to Manage Web Check In/Out & Time Runner in Horilla HRMS | Open Source HR Software | Free HRMS
2024-09-27How to Configure Reconciliation Models in Odoo 17 Accounting | Odoo 17 Accounting Tutorials| Odoo 17
2024-09-26How to Manage Validate, Approve & Validated Attendance in Horilla HRMS | Free HR Software| Free HRMS
2024-09-26Customer LOT/Serial Number Report in Odoo 18| Odoo 18 New Features | Odoo 18 Release| Odoo 18 Update
2024-09-26How Does AI Powered Drive Thru Work | How to Order Food in Any Language at a Restaurant Drive-Thru
2024-09-25Function Arguments in Python| EP-44 Types of Function Arguments in Python| Types of Python Arguments
2024-09-24ARM - Movie Night with Cybrosians 🎦🍿⚡️🎞️ | Ajayante Randam Moshanam | Tovino Thomas | Jithin Lal
2024-09-24What is Python Functions | EP-43 Python Functions | Functions in Python | Free Python Tutorials
2024-09-24Leave dashboard in Horilla HRMS | Free Leave Management Software | HRMS Leave Management System
2024-09-24Odoo 18 Improved Dashboard App | Odoo 18 Dashboard | Odoo 18 New Features | Odoo 18 Release Date
2024-09-23How to Create a Mail Template in Horilla HRMS | Free HR Software | Open Source HRMS Software
2024-09-23Sub Thread in Odoo 18 Discuss | Odoo 18 Features | Odoo 18 Release Date | Odoo 18 Discuss App
2024-09-20Loyalty Cards & E-Wallets in Portal in Odoo 18 | Odoo 18 New Features | Odoo 18 Release Date
2024-09-20How to Create a New Disciplinary Action Type in Horilla HRMS| Employee Disciplinary Tracking in HRMS
2024-09-20EP-2 Filter Rules & Domains | Odoo 17 Studio | Odoo 17 Features | Odoo 17 Tutorials
2024-09-19What are Loop Control Statements in Python | EP-42 Break, Continue & Pass in Python | Python Loops
2024-09-18What is While Loop in Python | EP-41 While Loop in Python| Python While Loops| Free Python Tutorials
2024-09-18How to Customize Your Own Apps in Odoo 17 Studio | EP-1 Customize Your App | Odoo 17 Studio Module