# Python

## Print All Integers That Aren’t Divisible By Either 2 Or 3 And Lie Between 1 And 50 In Python.

In this Basic Python Program, we will have a look at how to “print all integers that are not divisible by either 2 or 3” with the help of Python Programming Language. Python Program  To Print All Integers That Aren’t Divisible By Either 2 Or 3 And Lie Between 1 And 50  for i in …

## Check If A Number Is A Palindrome In Python

In this Basic Python Program, we will have a look at how to “check if a number is a palindrome” with the help of Python Programming Language. Python Program To Check If a Number is a Palindrome n=int(input(“Enter number:”)) temp=n rev=0 while(n>0):     dig=n%10     rev=rev*10+dig     n=n//10 if(temp==rev):     print(“The number is a palindrome!”) else:     print(“The number isn’t …

## Count the Number of Digits in a Number in python

In this Basic Python Program, we will have a look at how to “count the number of digits in a number” with the help of Python Programming Language. Python Program To Count Number Of Digits  n=int(input(“Enter number:”)) count=0 while(n>0):     count=count+1     n=n//10 print(“The number of digits in the number are:”,count) In the above program, we counted …

## Find the Sum of Digits in a Number in python

In this Basic Python Program, we will have a look at How to “Find the sum of digits” with the help of Python Programming Language. Python Program To Find the Smallest Divisor of an integer n=int(input(“Enter an integer:”)) a=[] for i in range(2,n+1):     if(n%i==0):         a.append(i) a.sort() print(“Smallest divisor is:”,a) In the above program, we easily …

## Print Odd Numbers Within a Given Range in python

In this Basic Python Program, we will have a look at How to “print odd numbers” with the help of Python Programming Language. Python Program TO Priint Odd Numbers start, end = 4, 19 # iterating each number in list  for num in range(start, end + 1):  # checking condition  if num % 2 != …

## Accept Three Digits and Print all Possible Combinations from the Digits in python

In this Basic Python Program, we will have a look at How to “print all the possible combination from the digits” with the help of Python Programming Language. Python Program To Print All Possible Combinations from the Digits a=int(input(“Enter first number:”)) b=int(input(“Enter second number:”)) c=int(input(“Enter third number:”)) d=[] d.append(a) d.append(b) d.append(c) for i in range(0,3): …

## Read Two Numbers and Print Their Quotient and Remainder in python

In this Basic Python Program, we will have a look at How to “read two numbers and print their quotient & remainders” with the help of Python Programming Language. Python Program To Read Two Numbers and Print Their Quotient and Remainder a=int(input(“Enter the first number: “)) b=int(input(“Enter the second number: “)) quotient=a//b remainder=a%b print(“Quotient is:”,quotient) …

## Print all Numbers in a Range Divisible by a Given Number in python

In this Basic Python Program, we will have a look at How to “Print all numbers in a range divisible by a given number” with the help of Python Programming Language. Python Program to Print All Numbers In A Range Divisible By a Given Number lower=int(input(“Enter lower range limit:”)) upper=int(input(“Enter upper range limit:”)) n=int(input(“Enter the …

## Reverse A Given Number In Python

In this Basic Python Program, we will have a look at How to “Reverse a given number” with the help of Python Programming Language. Python Program To Reverse A Given Number In Python Number = int(input(“Please Enter any Number: “))     Reverse = 0     while(Number > 0):         Reminder = Number %10         Reverse = (Reverse *10) + …

## Read Two Numbers and Print Their Quotient and Remainder in python

In this Basic Python Program, we will have a look at how read Two Numbers and Print Their Quotient and Remainder in python. Python program to read Two Numbers and Print Their Quotient and Remainder a=int(input(“Enter the first number: “)) b=int(input(“Enter the second number: “)) quotient=a//b remainder=a%b print(“Quotient is:”,quotient) print(“Remainder is:”,remainder) Output: Enter the first …