I am new to Python and trying to figure a way to input numbers to a mathematical formula.
Mathematical formula as shown:
I have developed based on the above formula, but not fully sure why it cant work.
def cumulative_function():
alpha = 0.05
fx_value = 5
variable_a = -100
k = 2
cdf_formula = alpha * (fx_value * (a) + fx_value * (k - 2 * (alpha) + fx * (k - alpha) + fx_value * (value_x)))
return cdf_formula
cdf = cumulative_function()
print (f"value is: {cdf}")
*EDIT: How do I insert the infinity ('...') in the formula to my program? Would appreciate anyone who can help me out:)
fx(a) is not fx *(a) but actually a function to which you are passing a value 'a'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.