# Category Archives: Python Programs Using Looping Statements

## Use of break and continue in Python with Examples

Topic: Use of break and continue in Python with Examples What is the importance of break and continue Statements in Python with Examples? break Statement in Python In Python programming language, break statement is used to break ( terminate ) the for loop or while loop. As soon as the break statement is executed the… Read More »

## Python Program To Print a to z using for loop and chr function

Topic: Python Program To Print a to z using for loop and chr() function We will use the built-in Python function chr() to print the small alphabets from a to z. We know that the Ascii code of ‘a’ is 97 and that of ‘z’ is 122. Therefore we will use a range() function in… Read More »

## Python Sentinel Controlled Loop Example Program

Topic: Python Sentinel Controlled Loop Example Program What is a Sentinel Controlled Loop inPython? A Sentinel Controlled Loop is a loop whose execution depends upon a special value. This sentinal controlled loop is terminated if a special value called sentinel value is encountered. The sentinel controlled loops are conditional loops. For example we can use… Read More »

## Python Multiplication Table of Number by Function Program

Python Multiplication Table of Number by Function Program # An example Python program # to define and call a function table # to show multiplication table of a number # Author : www.EasyCodebook.com (c) # Note the first line in function is called # document string, it # define the function with formal parameter num… Read More »

## Python GCD Program by Successive Division

Python GCD Program by Successive Division – This Python Programming tutorial will explain the Pthon code to find Greatest Common divisor or HCF. The HCF stands for Highest common factor which is a second name of GCD. This progrram will calculate GCD of two positive inetegers using Improved version of Euclid’s algorithm – Succesive division… Read More »

## Python GCD Program with for statement

Python GCD Program with for statement – This Programming tutorial will explain a simple logic and Python code to find GCD. A simple for loop statement is used to calculate Greatest common Divisor of the two given numbers. The Source code and Output of Python GCD Program with for statement # Write a Python program… Read More »

## Python while loop Syntax Flowchart Example

Python while loop Syntax Flowchart Example – This Python programmingtutorial will explain in a simple and easy to understand way: The while loop statement in Python The Syntax of the while loop The flowchart of while loop The examples and working of while loop The Real Example of while loop The Python progam source code… Read More »

## List of Primes Python Program

List of Primes Python Program – This Python programming tutorial will explain the Python code to show the list of all prime numbers between to given numbers. For example the list of prime numbers between 2 annd 10 is: 2, 3, 5, 7. We will write a Python function show_all_prime(num1,num2) that will display the list… Read More »

## Perfect Number Python Program

Perfect Number in Python – This Python programming tutorial will explain what is a perfect number with examples. It also provides a source code in Python for checking a number if it is a perfect number or not. What is the Definition of a Perfect Number in Mathematics In number theory, we may define a… Read More »

## Python Program Print Star Pattern 6

Python Program Print Star Pattern 6 – This Python Programming Tutorial will explain the Python program to print the star pattern number 6 as shown in the following figure: The Source Code of Python Program to Print Star Pattern 6 # Write a Python program to display # the following star pattern 6 # using… Read More »