top of page
Search
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...
304 views0 comments
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...
50 views0 comments
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...
99 views0 comments
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 ; ;...
5,414 views0 comments
Rajesh Singh
Mar 26, 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, '=',...
153 views0 comments
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...
75 views0 comments
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:...
81 views0 comments
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 %...
106 views0 comments
Rajesh Singh
Mar 26, 20201 min read
Python Program to Check a Number is Odd or Even ?
Python Program to Check a Number is Odd or Even num = int(input("Enter a number: ")) if (num % 2) == 0: print("{0} is Even".format(num))...
157 views0 comments
Rajesh Singh
Mar 26, 20201 min read
Python program to find largest number of three or two numbers
To find the largest number among the three input numbers. a = int(input("Enter first number: ")) b= int(input("Enter second number: ")) c...
135 views0 comments
bottom of page