Python program to print first n prime numbers

python program to Print First N Prime Numbers

In this tutorial, we are going to learn a python program to print all the prime numbers that are smaller than or equal to the number given as an input by the user. Problem Statement For any number that is input by the user, we have to print all the prime numbers. For example: What … Read more

Factorial Program in python using recursion with explanation

Calculate The Factorial Using Recursion in python

In this tutorial, we are going to learn writing python program to find the factorial of the number using recursion method. We will take a number from the users as and input and our program will print the factorial as an output. Problem Statement For any numbers that are input by the user, we have … Read more

Find the Average of numbers in Python

python program to Find The Average Of Numbers

In this tutorial, we are going to learn writing python program to find the average of numbers given as input from the user. In Python, there are several ways to compute the average, depending on the source and structure of the input data. Each method has its benefits and is suitable for different scenarios. Here, … Read more

Singly linked list: Create and Traverse Python Program

To create and traverse singly Linked List

  In this tutorial, we are going to learn the python program to create a singly linked list and traverse its elements. Problem Statement Our program will take the elements of the linked list from the user as the input and then print the elements of the linked list. For example What is a Linked List? … Read more

Python Program To Calculate The Factorial

Factorial Program in Python

Description                    In this tutorial, we are going to learn a python program to find the factorial of the number given as input from the user. Problem Statement                    For any numbers that are input by the user, we have to calculate the factorial of that numbers. For example What is Factorial of a number? … Read more

Java Program to Calculate the Cube of a Number

cube program in java

In this tutorial we will learn writing java program to calculate the cube of a given number.  Our program will take a number and will return the cube of that number as output. What is Cube of Number? When a number is multiplied to itself three times, resultant number is known as cube of number. … Read more

Calculate power of given number in Java

power program in java

In this tutorial we will learn writing a program in java to calculate the power of a given number. To calculate the power, user will give the base number and the exponent number. Power is calculated by multiplying the base number exponent times. For Example: Suppose we have to calculate 5 to power 3. Here … Read more

Even and Odd number Program in Java

even odd program in java

In this tutorial we will learn writing the program in Java to check whether a given number is even number or not. Before start writing Lets know What is Even and Odd number? A number is even if it is completely divisible by 2 with 0 remainder. And the number that does not completely divisible … Read more

Factorial Program In Java using loop and recursion

java factorial program

In this tutorial we will learn writing program in java to find the factorial of a number using for loop, while loop, functions and recursions. Before start writing the program Lets first know What is Factorial of a number? Factorial of a whole number ‘n’  is the product of that number with every whole number … Read more