Program to generate factors of a number

Let’s write a Python program to generate factors of a number. What are factors of a number? The factors of a number are those numbers which can divide the given number exactly. A number when divided by its factor yields a zero remainder. Some examples are given below. Each number has atleast two factors, 1... » read more

Program to check if number is Prime
Program to check if number is Prime

Let’s write a Python program to check if number is prime or not. What is a Prime number? A number which is not divisible by any number except 1 and itself is called as a prime number. A prime number has only two factors, 1 and itself. How to check if number is prime? To... » read more

Variables in Python

In this article, we will discuss the different aspects of using variables in Python like declaring variables, assigning values to variables and the data types of variables. Declaring Variables in Python In Python, there is no need to explicitly declare variables. Instead we just assign a value to a variable and start using it in... » read more