♫musicjinni

#32 Python Tutorial for Beginners | Functions in Python

video thumbnail
Spring and Microservices Live Course : https://bit.ly/springmslive
Coupon: TELUSKO25 (25% Discount)

Industry-Ready Java Spring Microservices Developer Live : https://bit.ly/JavaMS2
Complete Java Developer Course : https://bit.ly/Comp-Java-Dev-2
Coupon: TELUSKO20 (20% Discount)

For More Queries WhatsApp or Call on : +919008963671

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

Instagram : https://www.instagram.com/navinreddyofficial/
Linkedin : https://in.linkedin.com/in/navinreddy20

TELUSKO Android App : https://bit.ly/TeluskoApp

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

Java Tutorial for Beginners 2023

Python for Beginners | Full Course

Mistake while learning a programming language #java #python

#0 Python for Beginners | Programming Tutorial

5 Steps to improve Programming Skills

#3 Python Tutorial for Beginners | Getting Started with Python

#1 Python Tutorial for Beginners | Introduction to Python

Big Update in Java for Learners and Trainers

#51 Python Tutorial for Beginners | Constructor, Self and Comparing Objects

Java Tutorial for Beginners | Full Course

#5 Python Tutorial for Beginners | List in Python

#2 Python Tutorial for Beginners | Python Installation | PyCharm

#6 Python Tutorial for Beginners | Tuple | Set in Python

Dictionary in Python

Which is the Best Programming Language to Learn First?

Complete Java, Spring, and Microservices course

#64 Python Tutorial for Beginners | MultiThreading

Python Tutorial First Code

Big Update for Java Learners and Trainers | JDK 21

#28 Python Tutorial for Beginners | Why Numpy? Installing Numpy in Pycharm

#4 How Java Works

#4 Python Tutorial for Beginners | Variables in Python

#32 Python Tutorial for Beginners | Functions in Python

#23 Python Tutorial for Beginners | Printing Patterns in Python

#67 Python Tutorial for Beginners | is Python Compiled or Interpreted Language?

#57 Python Tutorial for Beginners | Introduction to Polymorphism

#12 Python Tutorial for Beginners | Number System Conversion in Python

#48 Python Tutorial for Beginners | Object Oriented Programming | Introduction

What after Python?

14.11 HashMap and HashTable in Java

Disclaimer DMCA