In this python program please put the final answer/Summation of all iterations is 0.95 and please show the output. Thank you Source Code: print("The function is f(x)= 2x+3(2)") print("Width is 0.05") lowLim=float(input("Enter Lower Limit: ")) upperLim=float(input("Enter Upper Limit: ")) iterations = (upperLim - lowLim)/0.05 i=0 finAns = 0 while(i
In this python program please put the final answer/Summation of all iterations is 0.95 and please show the output. Thank you
Source Code:
print("The function is f(x)= 2x+3(2)")
print("Width is 0.05")
lowLim=float(input("Enter Lower Limit: "))
upperLim=float(input("Enter Upper Limit: "))
iterations = (upperLim - lowLim)/0.05
i=0
finAns = 0
while(i<iterations):
print("_________________________________________________________________________________________________________________________________")
print("Iteration:",(i + 1))
print("Function\t\t|\tLower Limit \t|\t Upper Limit \t|\t LRAM Application (width=0.05) \t|\t Answer")
initAns=((2 *lowLim) + (3 * 2)) * 0.05
print("f(x)= 2x+3(2) \t\t|\tx={:0.2f}\t\t|\tx={:0.2f}\t\t|\t f(x) = (2({:0.2f})+3(2) * 0.05\t|\t {:0.2f}".format(lowLim,lowLim+0.05,lowLim,initAns))
finAns += initAns
lowLim+=0.05
i += 1
This is a sample output below of Final answer/Summation of all iterations is 0.95
Step by step
Solved in 3 steps with 2 images