Category Archives: Python Programs using User Defined Functions

Find GCD By Euclidean Algorithm Python Program

Find GCD By Euclidean Algorithm – Write a Python program to find the greatest common divisor (GCD) of two numbers using the Euclidean algorithm. The Euclidean algorithm The Euclidean algorithm is a method for finding the greatest common divisor (GCD) of two integers. The algorithm is based on the principle that the GCD of two… Read More »

Loading

Python Convert Millimeters to Inches using Function

Python Convert Millimeters to Inches using function – This Python program will input millimeters  from the user. It will convert mm into inches. The Formula To Convert mm into Inches To convert millimeters into inches, Multiply millimeters by 0.0393701 or divide millimeters by 25.4. Source Code – Python Function To Convert mm to Inches #Python… Read More »

Loading

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 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