Categories
Python Examples

Python Program to Check if a Number is Positive, Negative or 0

In this example, you will learn to check whether a number entered by the user is positive, negative or zero. […]

Categories
Python Examples

Python Program to Compute the Power of a Number

In this example, you will learn to compute the power of a number. Example 1: Calculate power of a number […]

Categories
Python Examples

Python Program to Reverse a Number

In this example, you will learn to reverse a number. Example 1: Reverse a Number using a while loop num […]

Categories
Python Examples

Python Program to Iterate Over Dictionaries Using for Loop

In this example, you will learn to iterate over dictionaries using for loop. Example 1: Access both key and value […]

Categories
Python Examples

Python Program to Create Pyramid Patterns

In this example, you will learn to print half pyramids, inverted pyramids, full pyramids, inverted full pyramids, Pascal’s triangle, and […]

Categories
Python Examples

Python Program to Find the Sum of Natural Numbers

In this program, you’ll learn to find the sum of n natural numbers using while loop and display it. In […]

Categories
Python Examples

Python Program to Find Armstrong Number in an Interval

In this example, we will learn to find all the Armstrong numbers present in between two intervals in Python. A […]

Categories
Python Examples

Python Program to Check Armstrong Number

In this example, you will learn to check whether an n-digit integer is an Armstrong number or not. A positive […]

Categories
Python Examples

Python Program to Print the Fibonacci sequence

In this program, you’ll learn to print the Fibonacci sequence using while loop. A Fibonacci sequence is the integer sequence […]

Categories
Python Examples

Python Program to Display the multiplication Table

This program displays the multiplication table of variable num (from 1 to 10). In the program below, we have used […]