Number of chocolates left after k iterations | Function to find the chocolates left ; Driver code
def results ( n , k ) : NEW_LINE INDENT return round ( pow ( n , ( 1.0 / pow ( 2 , k ) ) ) ) NEW_LINE DEDENT k = 3 NEW_LINE n = 100000000 NEW_LINE print ( " Chocolates ▁ left ▁ after " ) , NEW_LINE print ( k ) , NEW_LINE print ( " iterations ▁ are " ) , NEW_LINE print ( int ( results ( n , k ) ) ) NEW_LINE