< Back

Lab 23: Review

Leveling

Write a function called level_sounds(sound_1, sound_2). This function should "level" sound_1, using the maximum value from sound_2. Consider a sound leveled if every value from the original sound that was greater than the leveled maximum is directly set to the leveled maximum.

Example

Before

Alpha

lack_of_faith

After

Alpha Bravo