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: Find GCD By Euclidean Algorithm Python Program »

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: Python Convert Millimeters to Inches using Function »

Loading

Python Find Area of Circle using User Defined Function

Topic: Python Find Area of Circle using User Defined Function The area of a circle is given by the formula: area = PI x R2 where PI is the popular math constant = 3.14159 and R is the radius of the circle. We will use the math module in this Python program. Import math module… Read More: Python Find Area of Circle using User Defined Function »

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: Python Print Birthday Poem Program »

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: Python Multiplication Table of Number by Function Program »

Loading