Python Print Birthday Poem Program

Python Print Birthday Poem Program for printing the popular happy birthday poem to a specific person. This Python program uses a user defined function print_birthday_poem(person_name). This function takes a person name as parameter and prints happy birthday poem for him / her. The main function will ask the input that is the birthday person’s name.… Read More »

Loading

Python Recursive Function Check Palindrom String

Python Recursive Function Check Palindrom String # Write a Python program to # input a string and find # whether the string is a palindrome or not # www.easycodebook.com # Start of the Python program # define the recursive function def is_palindrome(s): if len(s) <= 1: # Base case return True elif s[0] != s[len(s)… Read More »

Loading

Python Insertion Sort Program using Array

Python Insertion Sort Program using Array # Write a Python program insertion sort # to input n numbers in # python array and sort them # in ascending order using insertion sort algorithm # Perfect Python Programming Tutorials # Author : www.EasyCodebook.com (c) import array # define a function for insertion sort def insertion_sort(arr): for… Read More »

Loading

Python Array Module Selection Sort Program

Python Array Module Selection Sort # Write a Python program # to input n numbers in # python array and sort them # in ascending order using selection sort algorithm # Perfect Python Programming Tutorials # Author : www.EasyCodebook.com (c) import array # define a function selection_sort() def selection_sort(arr): n = len(arr) for i in… Read More »

Loading

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 »

Loading

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 »

Loading