in your count() function, the variable probability is created when the function called, it is not the same variable probability you declared at beginning.
I think you may want to use the variable as global variable.
2
solved please correct the following code [closed]