unit5_pp/scripts/unit5_exercise.py
def rescale_to_max_value(max_value, input_list):
    """ Rescale each value inside input_list into a target range of 0 to max_value """
    scale_factor = max_value / float(max(input_list))
    # Multiply each item by the scale_factor
    input_list_rescaled = [int(x * scale_factor) for x in input_list]
    return input_list_rescaled
 Rescale each value inside input_list into a target range of 0 to max_value 
Rescale each value inside input_list into a target range of 0 to max_value
Rescale each value inside input_list into a target range of 0 to max_value
def rescale_to_max_value(max_value, input_list):
    scale_factor = max_value / float(max(input_list))
    input_list_rescaled = [int(x * scale_factor) for x in input_list]
    return input_list_rescaled
def rescale_to_max_value ( max_value , input_list ) : scale_factor = max_value / float ( max ( input_list ) ) input_list_rescaled = [ int ( x * scale_factor ) for x in input_list ] return input_list_rescaled
Rescale each value inside input_list into a target range of 0 to max_value
Rescale each value inside input_list into a target range of 0 to max_value
""" Rescale each value inside input_list into a target range of 0 to max_value """ # Multiply each item by the scale_factor
max_value
input_list