import math


def poisson(n, expectedValue):
    """
    Calculates the probability-value of an integer in a poisson distribution.
    
    Args:
        n (int): quantity of which you want to know the probability
        expectedValue (float): the average value that defines the poisson distribution
        
    Returns:
        float: probability of "n" in distribution "expectedValue"
    """
    # Only consider whole numbers
    if n<0 or n%1!=0:
        return 0
    else:
        return (expectedValue**n)/math.factorial(n)*math.exp(-expectedValue)