To demonstrate how this works, look at the G major scale below. Notice that the 7th degree is F sharp (F#) instead of F. This is done to maintain the correct pattern of tones and semitones and thus retain the sound of the major scale (do re mi fa so la ti do).