Closed martin-henz closed 4 months ago
https://share.sourceacademy.org/kojls
def fact_iter(product, counter, max_count): if counter > max_count: return product else: return fact_iter(counter * product,counter + 1, max_count) def factorial_iterative(n): return fact_iter(1, 1, n) factorial_iterative(5)
gives:
Line 14: ExpectedTokenError: SyntaxError at line 14 column 9 def factorial_iterative(n): ^ Expected indent. Found 'return'.
https://share.sourceacademy.org/kojls
gives: