'''PYTHON USES PASS BY OBJECT.WHEN MUTABLE OBJECTS ARE USED AS ARGUEMENTS THEY ACT AS PASS BY REFERENCE.LIST,DICTIONARY,BYTEARRAY,SET ARE MUTABLE HENCE FOLLOW PASS BY REFERENCE'''
'''PROBLEM : SIMPLE FEATURE SCALLING IS DATA NORMALISATION METHOD GIVEN A LIST AS INPUT,GIVE A OUTPUT LIST IN WHICH ALL ELEMENTS ARE DIVIDED BY THE MAXIMUM ELEMENT IN LIST'''

def simple_feature_scalling(n): #function definition
    maximum=max(n)
    for i in range(len(n)):
        n[i]=n[i]/maximum
    print "LIST INSIDE THE FUNCTION AFTER PERFORMING THE SIMPLE FEATURE SCALLING : ",n
l=[10.0,20.0,22.3,25.5,30.2]
print "GIVEN LIST BEFORE PASSING TO THE FUNCTION(outside the function) : ",l
simple_feature_scalling(l) #function call
print "GIVEN LIST AFTER PASSING  TO THE FUNCTION(outside the function) : ",l
'''ORIGINAL LIST THAT IS PASSED AS ARGUEMENT DURING FUNCTION CALL IS CHANGED AS IT IS MUTABLE'''
'''OUTPUT : GIVEN LIST BEFORE PASSING TO THE FUNCTION(outside the function) :  [10.0, 20.0, 22.3, 25.5, 30.2]
            LIST INSIDE THE FUNCTION AFTER PERFORMING THE SIMPLE FEATURE SCALLING :  [0.33112582781456956, 0.6622516556291391,                 
            0.7384105960264901, 0.8443708609271523, 1.0]
            GIVEN LIST AFTER PASSING  TO THE FUNCTION(outside the function) :  [0.33112582781456956,0.6622516556291391,0.7384105960264901,     
            0.8443708609271523, 1.0]'''

'''PYTHON USES PASS BY OBJECT.WHEN MUTABLE OBJECTS ARE USED AS ARGUEMENTS THEY ACT AS PASS BY REFERENCE.LIST,DICTIONARY,BYTEARRAY,SET ARE MUTABLE HENCE FOLLOW PASS BY REFERENCE'''
'''PROBLEM : SIMPLE FEATURE SCALLING IS DATA NORMALISATION METHOD GIVEN A LIST AS INPUT,GIVE A OUTPUT LIST IN WHICH ALL ELEMENTS ARE DIVIDED BY THE MAXIMUM ELEMENT IN LIST'''

def simple_feature_scalling(n): #function definition
    maximum=max(n)
    for i in range(len(n)):
        n[i]=n[i]/maximum
    print "LIST INSIDE THE FUNCTION AFTER PERFORMING THE SIMPLE FEATURE SCALLING : ",n
l=[10.0,20.0,22.3,25.5,30.2]
print "GIVEN LIST BEFORE PASSING TO THE FUNCTION(outside the function) : ",l
simple_feature_scalling(l) #function call
print "GIVEN LIST AFTER PASSING  TO THE FUNCTION(outside the function) : ",l
'''ORIGINAL LIST THAT IS PASSED AS ARGUEMENT DURING FUNCTION CALL IS CHANGED AS IT IS MUTABLE'''
'''OUTPUT : GIVEN LIST BEFORE PASSING TO THE FUNCTION(outside the function) :  [10.0, 20.0, 22.3, 25.5, 30.2]
            LIST INSIDE THE FUNCTION AFTER PERFORMING THE SIMPLE FEATURE SCALLING :  [0.33112582781456956, 0.6622516556291391,                 
            0.7384105960264901, 0.8443708609271523, 1.0]
            GIVEN LIST AFTER PASSING  TO THE FUNCTION(outside the function) :  [0.33112582781456956,0.6622516556291391,0.7384105960264901,     
            0.8443708609271523, 1.0]'''

PYTHON USES PASS BY OBJECT.WHEN MUTABLE OBJECTS ARE USED AS ARGUEMENTS THEY ACT AS PASS BY REFERENCE.LIST,DICTIONARY,BYTEARRAY,SET ARE MUTABLE HENCE FOLLOW PASS BY REFERENCE PROBLEM : SIMPLE FEATURE SCALLING IS DATA NORMALISATION METHOD GIVEN A LIST AS INPUT,GIVE A OUTPUT LIST IN WHICH ALL ELEMENTS ARE DIVIDED BY THE MAXIMUM ELEMENT IN LIST #function definition #function call ORIGINAL LIST THAT IS PASSED AS ARGUEMENT DURING FUNCTION CALL IS CHANGED AS IT IS MUTABLE OUTPUT : GIVEN LIST BEFORE PASSING TO THE FUNCTION(outside the function) :  [10.0, 20.0, 22.3, 25.5, 30.2]             LIST INSIDE THE FUNCTION AFTER PERFORMING THE SIMPLE FEATURE SCALLING :  [0.33112582781456956, 0.6622516556291391,                              0.7384105960264901, 0.8443708609271523, 1.0]             GIVEN LIST AFTER PASSING  TO THE FUNCTION(outside the function) :  [0.33112582781456956,0.6622516556291391,0.7384105960264901,                  0.8443708609271523, 1.0]