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.
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 […]
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 […]
Here we will a program to convert Celsius to Fahrenheit in Python, lets first understand how to convert Celsius to Fahrenheit. How to convert? We will use the simple formula for the conversion of temperature from Celsius to Fahrenheit. Now lets write the code for the same. Python Program to Convert Celsius To Fahrenheit OUTPUT: […]
Here we will write a Python program to convert Decimal to Binary, Octal and Hexadecimal number systems. How to convert Decimal to Binary, Octal and Hexadecimal? Good thing is in Python we have built-in functions for these conversions. In our program we will use built-in functions bin(), oct() and hex() to convert the given decimal […]
Here we will write a Python program to find factors of numbers using for loop. So without wasting any time lets write the code for it. Python program to find factors of numbers: Code Explanation: In this program, the number whose factor is to be found is stored in num. Then we display its […]