May 2022
Intermediate to advanced
352 pages
9h 15m
English
62.6738 is rational because it has a finite number of decimal places, and therefore can be expressed as a fraction 626738 / 10000.
=
The resulting amount would be $1,161.47. The Python script is as follows:
frommathimportexpp=1000r=.05t=3n=12a=p*(1+(r/n))**(n*t)(a)# prints 1161.4722313334678
The resulting amount would be $1161.83. The Python script is as follows:
frommathimportexpp=1000# principal, starting amountr=.05# interest rate, by yeart=3.0# time, number of yearsa=p*exp(r*t)(a)# prints 1161.834242728283
The derivative calculates to 6x, which would make the slope at x = 3 to be 18. The SymPy code is as follows:
fromsympyimport*# Declare 'x' to SymPyx=symbols('x')# Now just use Python syntax to declare functionf=3*x**2+1# Calculate the derivative of the functiondx_f=diff(f)(dx_f)# prints 6*x(dx_f.subs(x,3))# 18
The area under the curve between 0 and 2 is 10. The SymPy code is as follows:
fromsympyimport*# Declare 'x' to SymPyx=symbols('x')# Now just use Python syntax to declare functionf=3*x**2+1# Calculate the integral of the function with respect to x# for the area between x = 0 and 2area=integrate(f,(x,0,2))(area)# prints 10
0.3 × 0.4 = 0.12; refer to “Joint Probabilities”