Chapter 2 Functionseng 1 PDF
Chapter 2 Functionseng 1 PDF
By:
Neha Tyagi, PGT CS
KV No-5, 2nd Shift
Jaipur
• random (): This generates floating value between 0 and 1. it does not
require any argument.
• uniform (): This method return any floating-point number between two
given numbers.
• shuffle (): this method can shuffle or swap the items of a given list.
def Function_Name(List_Of_Parameters):
”””docstring”””
statement(s)
After the line containing def
there should be a 4 spaces
Keyword indentation, which is also
know as the body or block
of the function. Function
Definition
Function
Definition
Function Call
In python a function
may return multiple
values. In multiple
returning it returns a
sequence of values to
the calling statement.
These returned values
may be used as per the
requirement.
www.pythontrends.wordpress.com