[Type C]Q8. Write a function that takes two numbers and returns the number that has a minimum of 1 digit. For example: If the number passed is 491 and 278, then the function will return 491 because it has got a minimum one’s digit out of two given numbers.

A function is a set of statements that take inputs, do some specific computation and produces output. 

You can pass data, known as parameters, into a function.

Syntax of function in python:

def function_name(parameters):
	"""docstring"""
	statement(s)

Program code:

Output:

85 
Both are Equal 
55

Basic use of python function is demonstrated in above program.

To view all the lessons in chapter 1: http://computertutor.in/class-12-computer-science/chapter-3/

To view entire class 12 computer science study material: http://computertutor.in/resources/

You cannot copy content of this page