top of page
Search
If statement in Python with Example
If statements are control flow statements and it is run a particular code only when a condition is satisfied. It means that to print a...

Rajesh Singh
Apr 1, 20201 min read
Python Program for Cube of a Number using Functions
Program: def cube(a): print("The Cube of given number", a*a*a) b = int(input(" Enter any number : ")) cube(b) Output: Please Enter any...

Rajesh Singh
Mar 31, 20201 min read


Python Program to add Two and Three numbers
Python Program to add two numbers Program: num1 = int (input(" Please Enter the First Number: ")) num2 = int (input(" Please Enter the...

Rajesh Singh
Mar 31, 20201 min read


Python Program to find roots of a Quadratic Equation
There are two method for finding roots of quadratic equation: Program: First Method: import cmath a = float (input("Enter the value of a...

Rajesh Singh
Mar 31, 20201 min read


Python Program to Check a Number is a Perfect Number
A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. For instance, 6...

Rajesh Singh
Mar 31, 20201 min read
Data Types in Python with examples
The type of the variable is known as Python Data type like integer variable, string variable, tuple, dictionary, list etc. There are two...

Rajesh Singh
Mar 31, 20202 min read
What is Python Identifiers?
Variable name is known as identifier. For exam the integer type of variable that has the value 20. Then name of the variable, which is...

Rajesh Singh
Mar 31, 20201 min read


Python program to swap two numbers
Python program Swap two Number with temporary variable a=int(input("Enter The First Number :")) b=int(input("Enter The Second Number :"))...

Rajesh Singh
Mar 31, 20201 min read
What is a Python Keyword?
A python keyword is a known as reserve word which can’t use as a name of your variable, class, function etc. These keywords have a...

Rajesh Singh
Mar 29, 20201 min read
Python Variables
Variables are used to store data and take memory space based on the type of value we assigning to them. We create variables in Python is...

Rajesh Singh
Mar 29, 20201 min read
What is Python Programming Language?
Python is a well-liked programming language. It was developed by Guido van Rossum in 1991. It is used for web development (server-side),...

Rajesh Singh
Mar 29, 20201 min read


Python Program to Check number is Palindrome or Not
A palindromic number is a number that remains the same when its digits are reversed. Like 121. Program: n=int(input("Enter number:")) a=n...

Rajesh Singh
Mar 29, 20201 min read


Python Program to Check Armstrong Number
Armstrong number is a number that is equal to the sum of cubes of its digits. For example 0, 1, 153, 370, 371 and 407 are the Armstrong...

Rajesh Singh
Mar 29, 20201 min read


Python Program to Find the Factorial of a Number
First method to find factorial number of given number: n = int(input("Enter a number: ")) fact = 1 if n < 0: print("Factorial does not...

Rajesh Singh
Mar 29, 20201 min read


Python Program to Print the Fibonacci sequence
Python Program to Print the Fibonacci sequence Using While Loop n = int(input("Enter the number for Fibonacci sequence : ")) a, b = 0, 1...

Rajesh Singh
Mar 29, 20201 min read


Python program to print even numbers between 1 to 100.
Python program to print even numbers between 1 to 100. Program: for num in range(1,100): if num%2==0: print (num) Output: 2 4 6 8 10 ; ;...

Rajesh Singh
Mar 29, 20201 min read


Python Program to Display the multiplication Table ?
Python Program to Display the multiplication Table num = int(input("Enter number: ")) for i in range(1, 11): print(num, 'x', i, '=',...

Rajesh Singh
Mar 26, 20201 min read


Python Program to Check a Number is Positive, Negative or 0 ?
Program: num = int(input("Enter a number: ")) if num>0: print("Positive") elif num<0: print("Negative") else: print("Zero") Output: Enter...

Rajesh Singh
Mar 26, 20201 min read


Python program to check given year is a leap or not?
Python program to check if year is a leap year or not year = int(input("Enter Year: ")) if year % 4 == 0 and year % 100 != 0:...

Rajesh Singh
Mar 26, 20201 min read


Python Program to Check given number is Prime or not
Python Program to Check input number is Prime Number Program: n = int(input("Enter any number: ")) if n > 1: for i in range(2, n): if n %...

Rajesh Singh
Mar 26, 20201 min read
bottom of page
