An experiment was set up to test the effects of different carbohydrates on fermentation of yeast. According to the experimental setup, what was the independent variable of the experiment?

A) Time
B) Type of sugar
C) Type of yeast
D) Rate of fermentation