Python Program to Print Multiplication Table

Write a Python Program to Print Multiplication Table using For Loop and While Loop with an example. If you want the multiplication table for a single number, the loop will return the result. However, you have to use nested loops for multiple numbers. The first one is for the original number and the nested loop to … Read more

Python Program to find Power of a Number

Write a Python Program to find the Power of a Number using a For Loop, While Loop, and pow function with an example. This Python program allows the user to enter any numerical value or exponent. Next, this program finds the power of a number using For Loop. number = int(input(” Please Enter any Positive Integer : … Read more

Python Program to Check Number is Divisible by 5 and 11

Write a Python program to Check Number is Divisible by 5 and 11 using If Else with an example. Python Program to Check Number is Divisible by 5 and 11 This python program allows users to enter any integer value. Next, this Python program checks whether the given number is divisible by both 5 and 11 using If Else. # Python Program … Read more

Python Program to Calculate Compound Interest

Write a Python program to Calculate Compound Interest with an example. Before we start the program, let me show you the formula behind this Compound Interest: Future CI = Principal Amount * ( 1 + ROI ) Number of years) The above calculation is called Future Compound Interest. Because it contains both Principal Amount & CI. … Read more

Python Program to Swap Two Numbers

Write a Program to Swap Two Numbers in Python using the Temp variable, Bitwise Operators, and Arithmetic Operators. The standard technique is using temporary variables. However, Python allows you to assign values to multiple variables using a comma, the best alternative method. Python Program to Swap Two Numbers Using Temp This program helps the user … Read more

Python Program to calculate Sum of Series 1³+2³+3³+….+n³

Write a Python Program to calculate Sum of Series 1³+2³+3³+….+n³ using For Loop and Functions with an example. The Mathematical formula for Python Sum of series 1³+2³+3³+….+n³ = ( n (n+1) / 6)² Python Program to calculate Sum of Series 1³+2³+3³+….+n³ This Python program allows users to enter any positive integer. Next, the Python finds the … Read more

Python Program to calculate Sum of Series 1²+2²+3²+….+n²

Write a Python Program to calculate Sum of Series 1²+2²+3²+….+n² using For Loop and Functions with an example. The Mathematical formula for Python Sum of series 1²+2²+3²+….+n² = ( n (n+1) (2n+1)) / 6 Python Program to calculate Sum of Series 1²+2²+3²+….+n² This Python program asks the user to enter any positive integer. Next, the Python program finds … Read more

Python Program to Print Square Number Pattern

Write a Python Program to Print Square Number Pattern using While Loop and For Loop with an example. Python Program to Print Square Number Pattern using For Loop This Python program allows users to enter any side of a square. This side decides the number of rows and columns of a square. Next, this program use For Loop to print 1’s until … Read more

Python Program to Print Square Star Pattern

Write a Python Program to Print Square Star Pattern using While Loop and For Loop with an example. Python Program to Print Square Star Pattern using For Loop This Python program allows users to enter any side of a square. This side decides the total number of rows and columns of a square. Next, this program uses For Loop to print stars … Read more

Python Program to find Sum and Average of N Natural Numbers

Write a Python Program to find Sum and Average of N Natural Numbers using While Loop, For Loop, and Functions with an example. Python Program to find Sum and Average of N Natural Numbers using For Loop This program allows users to enter any integer value. Next, this program calculates the sum and average of natural numbers from 1 to … Read more