Complete the code to calculate the factorial of 5 using scipy.
from scipy.special import [1] result = factorial(5) print(result)
The factorial function from scipy.special calculates the factorial of a number.
Complete the code to calculate the gamma function value at 4.
from scipy.special import [1] result = gamma(4) print(result)
The gamma function generalizes factorial to real and complex numbers. gamma(4) equals 3! = 6.
Fix the error in the code to correctly compute factorial of 7.
from scipy.special import factorial result = factorial([1]) print(result)
The factorial function expects an integer input, not a string. Use 7 without quotes.
Fill both blanks to create a dictionary of factorials for numbers 1 to 5.
from scipy.special import factorial factorials = {i: [1](i) for i in range(1, [2])} print(factorials)
Use factorial function and range up to 6 to include 5.
Fill all three blanks to create a dictionary of gamma values for numbers 1 to 4.
from scipy.special import gamma values = [1]: [2](i) for i in range(1, [3])} print(values)
Use i as key, gamma function for values, and range end 5 to include 4.
