Here we will write a program in Python to find the sum of Digits of a Number provided using while loop. Lets start with the steps for solution. Step-wise Solution: 1. Take the value of the integer and store in a variable. 2. Using a while loop, get each digit of the number and add […]

## Python Program to Reverse a number

Here we will write a program in Python to Reverse a number using while loop. Lets start with the steps: Step-wise Solution: 1. Take the value of the integer and store in a variable. 2. Using a while loop, get each digit of the number and store the reversed number in another variable. 3. Print […]

## Python Program to Make a Simple Calculator

Here we will write a program in Python to make a Simple Calculator which will implement addition, subtraction, multiplication and division depending upon the input from user. Lets see how: In this program, we ask the user to choose the desired operation. Options 1, 2, 3 and 4 are valid. Two numbers are taken and […]

## Python Program to Find the Largest Among Three Numbers

Here we will write a program in Python to find the largest among three numbers using if-else. In the program below, the three numbers are stored in num1, num2 and num3 respectively. I’ve used the if…elif…else ladder to find the largest among the three numbers. Python Program to Find the Largest Among Three Numbers: OUTPUT: Comment for any suggestion, concerns.

## Python Program to Solve Quadratic Equation

Here we will write a program in Python to solve quadratic equation, so first lets understand how to solve a quadratic equation. The standard form of a quadratic equation is: The value of a, b and c coefficients should be known to solve the quadratic equation, now lets write the program for the same. Python […]

## Python Program to Calculate Area of Triangle

Here we will write a program in Python to calculate Area of Triangle. To find the area of triangle we need the sides of the triangle, if this program will only work if we have sides of triangle. So let’s see how to calculate area of triangle: If a, b and c are three sides of a triangle. Then using […]