Browsing category

Function in Python

Python code to divide two numbers using function

Python code to divide two numbers using function In this tutorial, we will discuss the concept of Python code to divide two numbers using function In this topic, we are going to learn how to divide two numbers using the Function in Python language What is division The division is a method of splitting a…

Python program to find the power of a number using recursion

Python program to find the power of a number using recursion In this tutorial, we discuss the concept of Python program to find the power of a number using recursion In this post, we can calculate  power of a number using recursion in Python language Program def power(base,exp):#function declaration if(exp==1): return(base) if(exp!=1): return (base*power(base,exp-1)) base=int(input(“Enter…

Calculate electricity power:Python program using function

Calculate Electricity power: Python program using function In this tutorial, we will discuss the Calculate Electricity power: Python program using the function In this article, we will discuss how to calculate monthly  electricity bill using the function in the Python  programming language We can calculate monthly electric power usage in many approaches in Python language…

Python language Recursive function

Python language Recursive function In this tutorial, we discuss Python language Recursive function. When a function calls itself it is called as recursion. The python language allows creating the recursive function to perform a special task The following example explains how to find the adding of the limited natural numbers using the recursive function Example…

Python program to add two number using function

Python program to add two number using function In this tutorial, we will discuss Python program to add two number using function In this topic, we will learn a simple concept of how to add two numbers using the function in the Python programming language already we learned the same this concept using the operator in a…

Function in Python programming language

Function in Python programming language In this tutorial, we will discuss the function in Python programming language. Functions of Python are a collection of related and reusable statements under a single unit. They are used to perform a specific task and only run when they are called – similar to a method in Java Basically,…