Singing a note involves vibration of the vocal folds. In fact, many, but not all, of the sounds we make when speaking also involve vibration of the vocal folds. In English (and in most languages) all the vowels are “voiced” as are about half of the consonants; “voiced” is the phonetic term for speech sounds that include vibration of the vocal chords (also called “phonation”). For instance, switch between making a ssssss sound and a zzzzzz sound. If you pay careful attention to the position of your tongue, you should notice that it doesn’t really change position at all, in fact the only difference is whether or not your vocal folds are vibrating. Try going ssssszzzzzzzzssssssszzzzzzz without moving your tongue at all—that feeling is what it’s like to turn phonation on and off, and it’s completely independent of the rest of your vocal tract. The same thing is true if you alternate between ffffffff and vvvvvvv.
Now try changing the pitch and making a melody while making a constant zzzzzzzz. You can “z-hum” any melody you like. Try to do the exact same thing with sssssssss. It isn’t possible, because you can’t change the pitch of an unvoiced consonant without moving your tongue around, which changes the consonant completely. True, there’s a difference between the general sense of frequencies that are present when you change from a ssssss sound to a shhhhhh sound (like telling someone to be quiet), but that isn’t the same phenomenon as phonated pitch used in singing a melody.
OK, so there are actually lots of different kinds of whispering, but in most cases whispering is a method of producing sound that involves no vocal fold vibration at all. That is to say, there is no phonation happening. Try whispering the words “sag” and “zag”. If you pay very careful attention to the sound alone, and ignore your own knowledge of what you’re trying to say, you should hear that there isn’t really any difference between the two sounds. Try it with a friend and see if they can tell which one you’re saying (don’t put the words in a sentence like you would when whispering in class, people are very good at figuring things out from context). Something similar happens with the difference between “fairy” and “very”, they’re essentially the same sound when whispering, because the only major difference in regular speech is phonation. Be careful to use true, quiet whispering, there’s a more forced type of whispering (called breathy voice) which does allow the folds to vibrate.
Anyway, the upshot of all of this is that, when using a true whisper, there’s no such thing as pitch in the same sense we use when talking about singing. Just like you can’t sing a melody when exclusively making an ssssss sound, you can’t sing a melody when whispering—and for the same reason.