Table of Contents
In this tutorial, we will discuss the concept of Python programming language functions.
In python, function is a collection of related and reusable statements include as a single unit. This is used to perform a specific action that looks like a method.
Basically two type of functions are available in python.
1. Built-in function – this functions defines and it is a built-in python programming language.
For Examples – Math function, String function
2. User- defined function – Users can define the function themselves.
This tutorial explains user defined functions
The advantages of using functions are:
Syntax of python function
Example of function
We can demonstrate about python function usingthe following examples
Program 1
How to create simple “hello world” program using python function
Program 2
Program 3
When the above code was executed, it produced the following results
hello i am a function
Program 4
hello kanthan
hello Nimal
hello Santhan
Program 5
Subtract two numbers using method overriding Program 1
PHP Star triangle Pattern program Here's a simple Java program that demonstrates how to print…
Using Function or Method to Write to temperature conversion: Fahrenheit into Celsius In this article,…
Function or method of temperature conversion from Fahrenheit into Celsius In this article, we will…
Write temperature conversion program: from Fahrenheit to Celsius In this article, we will discuss the…
How to write a program to convert Fahrenheit into Celsius In this article, we will…
This website uses cookies.