Condition to find the charges bar in which the units consumed is fall
if ( units <= 100 ) : NEW_LINE INDENT return units * 10 ; NEW_LINE DEDENT elif ( units <= 200 ) : NEW_LINE INDENT return ( ( 100 * 10 ) + ( units - 100 ) * 15 ) ; NEW_LINE DEDENT elif ( units <= 300 ) : NEW_LINE INDENT return ( ( 100 * 10 ) + ( 100 * 15 ) + ( units - 200 ) * 20 ) ; NEW_LINE DEDENT elif ( units > 300 ) : NEW_LINE INDENT return ( ( 100 * 10 ) + ( 100 * 15 ) + ( 100 * 20 ) + ( units - 300 ) * 25 ) ; NEW_LINE DEDENT return 0 ; NEW_LINE