Another way to say "the speed of sound depends on the medium" is "sound travels at different speeds depending on what it has to pass through."