Hello, I have a little problem with the dictionary.
i use Random Integer as key in my Dictionary. however when I fill in the number in between from it, it always returns as not found.
how to fix this?
Thank You.
Hello, I have a little problem with the dictionary.
i use Random Integer as key in my Dictionary. however when I fill in the number in between from it, it always returns as not found.
how to fix this?
Thank You.
You see, by integer they specifically mean an integer. Is 0.1 an integer?
thank you, what should i use to define random number for it?
Numbers that are integers and not decimals, such as 0, 1, 2. Or even negative values, like -1, -2, -3.
yes sir. so, what should i use to define those in between number? thankyou
A random integer.
integer is a number without decimal or fractional part. thus 4.5, 7.8 are not integers but 4 and 5 are integer. so when you’re asking for a random number from 1 to 3 - you will get a 1,2 or 3 ,in any order , at random.
why are you doing this? it is entirely possible that you might get a duplicate random number. how will you handle that in your dictionary?