Write python code to complete factorial_str()’s recursive case

Write python code to complete factorial_str()’s recursive case. Sample output with input: 55! = 5 * 4 * 3 * 2 * 1 = 120 def factorial_str(fact_counter, fact_value): output_string = ” if fact_counter == 0: # Base case: 0! = 1 output_string += ‘1’ elif fact_counter == 1: # Base case: print 1 and result output_string += str(fact_counter) + ‘ = ‘ + str(fact_value) else: # Recursive case output_string += str(fact_counter) + ‘ * ‘ next_counter = fact_counter – 1 next_value = next_counter * fact_value output_string += ”’Need here to get the proper output”’ return output_string user_val = int(input()) print(‘{}! = ‘.format(user_val), end=””) print(factorial_str(user_val, user_val))

-25-


Buy plagiarism free, original and professional custom paper online now at a cheaper price. Submit your order proudly with us



Essay Hope