Density to Cumulative
Given a list pdf
write a function to_cdf(pdf)
to caluculate the cdf
.
Example:
Input:
def to_cdf(pdf)
return(cdf) ->
#Input
pdf = [1.2,3.4,5.3]
Output:
#output
cdf = [1.2,4.6,9.9]
Note: Round the numbers to 3 digits.
Next question: Move Zeros Back.....
Loading editor