I have a dictionary (keys are integers, values are float). I would now ask the dictionary for the value of the key that is > than the given number but < than the next greater key.
Example:
dict = {100: 0.0035, 150: 0.0024, 200: 0.0019}.
i give 122, it should give me 0.0035
i give 333, it should give me 0.0019
i give 200, it should give me 0.0024
Thanks!
Working example (tested under Firefox 3.6):