With the help of
sympy.rf() method, we can find the
Rising factorial. Rising factorial is defined by –
where
x can be arbitrary expression and
k is an integer.
Syntax: rf(x, k)
Parameter:
x – It denotes any arbitrary expression.
k – It denotes an integer.
Returns: Returns rising factorial corresponding to the given inputs.
Example #1:
from sympy import *
x = symbols( 'x' )
k = 5
print ( "Value of x = {} and k = {}" . format (x, k))
rf_x_k = rf(x, k)
print ( "Rising factorial rf(x, k) : {}" . format (rf_x_k))
|
Output:
Value of x = x and k = 5
Rising factorial rf(x, k) : x*(x + 1)*(x + 2)*(x + 3)*(x + 4)
Example #2:
from sympy import *
x = 7
k = 5
print ( "Value of x = {} and k = {}" . format (x, k))
rf_x_k = rf(x, k)
print ( "Rising factorial rf(x, k) : {}" . format (rf_x_k))
|
Output:
Value of x = 7 and k = 5
Rising factorial rf(x, k) : 55440