Descriptiondefine a recursive function accepts a number as


Function Name:factorial_dictionary

Description:Define a recursive function accepts a number as a parameter and returns a dictionary. The dictionary should contain, as a key, every number from 1 to the given number. The corresponding value for each key should be the factorial of that number.

You may not use any looping in your solution.

Your solution must use recursion in order to receive points.

Parameter(s):

1. A single positive integer.

Return Value:A dictionary containing each integer and it's corresponding factorial.

Example(s):

>>> print(factorial_dictionary(1)) {1: 1} >>> print(factorial_dictionary(5)) {1: 1, 2: 2, 3: 6, 4: 24, 5: 120}

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Descriptiondefine a recursive function accepts a number as
Reference No:- TGS01664510

Expected delivery within 24 Hours