Browsing category

function/method

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…

Recursion in Cpp programming language

Recursion in Cpp programming language In this tutorial, we will discuss recursion in Cpp programming language A function calling itself is called a recursive function. another word, a function calling from the definition of the same function is known the recursive function and this procedure is known as recursion Example of recursion function How recursion…

Recursion in C programming language

Recursion in C programming language In this tutorial, we will discuss recursion in C programming language A function calling itself during its execution. it is called a recursive function. another word, a function calling from the definition of the same function is known as a recursion   Example of recursive function   The flow of…

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…

Type of user defined function in Cpp language

Type of user defined function in C++ language In this tutorial, we will discuss Type of user defined function in C++ language Already, we would learn about Type of user-defined function in C language. Now we get to know Type of user-defined function in C++ language. The user defines functions are categorized are: Function with no…

Method in Java programming language with example

Method in Java programming language  with example In this tutorial, We will learn about Method in Java programming language with an example. Method in Java The method is an important concept in Object-oriented programming languages(Oop). In the Java programming language, a method is a segment of code referred to by a name that does a…

User defined function in C programming language

User defined function in C programming language We will learn about User defined function in the C programming language. C programming language allows coders to define functions to perform special tasks. As functions are defined by users, they are called user-defined functions. user-defined functions have contained the block of statements which are written by the…