[Type C]Q2. Write a function to calculate the volume of a box with appropriate default values for its parameters. Your function should have the following input parameters: 1] Length of box 2] Width of box 3] Height of box

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:

1
100
8 
35

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