@@ -0,0 +1,1839 @@
+%22%22%22%0A== Juggler Sequence ==%0AJuggler sequence start with any positive integer n. The next term is%0Aobtained as follows:%0A    If n term is even, the next term is floor value of square root of n .%0A    If n is odd, the next term is floor value of 3 time the square root of n.%0A%0Ahttps://en.wikipedia.org/wiki/Juggler_sequence%0A%22%22%22%0A%0A# Author : Akshay Dubey (https://github.com/itsAkshayDubey)%0Aimport math%0A%0A%0Adef juggler_sequence(number: int) -%3E list%5Bint%5D:%0A    %22%22%22%0A    %3E%3E%3E juggler_sequence(0)%0A    Traceback (most recent call last):%0A        ...%0A    ValueError: Input value of %5Bnumber=0%5D must be a positive integer%0A    %3E%3E%3E juggler_sequence(1)%0A    %5B1%5D%0A    %3E%3E%3E juggler_sequence(2)%0A    %5B2, 1%5D%0A    %3E%3E%3E juggler_sequence(3)%0A    %5B3, 5, 11, 36, 6, 2, 1%5D%0A    %3E%3E%3E juggler_sequence(5)%0A    %5B5, 11, 36, 6, 2, 1%5D%0A    %3E%3E%3E juggler_sequence(10)%0A    %5B10, 3, 5, 11, 36, 6, 2, 1%5D%0A    %3E%3E%3E juggler_sequence(25)%0A    %5B25, 125, 1397, 52214, 228, 15, 58, 7, 18, 4, 2, 1%5D%0A    %3E%3E%3E juggler_sequence(6.0)%0A    Traceback (most recent call last):%0A        ...%0A    TypeError: Input value of %5Bnumber=6.0%5D must be an integer%0A    %3E%3E%3E juggler_sequence(-1)%0A    Traceback (most recent call last):%0A        ...%0A    ValueError: Input value of %5Bnumber=-1%5D must be a positive integer%0A    %22%22%22%0A    if not isinstance(number, int):%0A        raise TypeError(f%22Input value of %5Bnumber=%7Bnumber%7D%5D must be an integer%22)%0A    if number %3C 1:%0A        raise ValueError(f%22Input value of %5Bnumber=%7Bnumber%7D%5D must be a positive integer%22)%0A    sequence = %5Bnumber%5D%0A    while number != 1:%0A        if number %25 2 == 0:%0A            number = math.floor(math.sqrt(number))%0A        else:%0A            number = math.floor(%0A                math.sqrt(number) * math.sqrt(number) * math.sqrt(number)%0A            )%0A        sequence.append(number)%0A    return sequence%0A%0A%0Aif __name__ == %22__main__%22:%0A    import doctest%0A%0A    doctest.testmod()%0A

Add juggler sequence (#7985)