Question: Question 2 (5p): What will be written inside the red-box when the below code is executed? Code floatingPointNumber = 0.1 print(Started calculation:) if floatingPointNumber *

Question 2 (5p): What will be written inside the red-box when the below code is executed? Code floatingPointNumber = 0.1 print("Started calculation:") if floatingPointNumber * 0.1 == 0.01: print("My Math works!") else: print("There is a problem with my math, I found floatingPointNumber * 0.1 as :", floatingPointNumber * 0.1) Output Started calculation: Question 3 (5p): Modify the above function using Epsilon variable and a different statement so that your code is not affected by the floating point round-off error: Code FloatingPoint Number = 0.1 brint("Started calculation:") If print("My Math works!") else: print("There is a problem with my math, I found floatingPoint Number * 0.1 as :", floatingPointNumber * 0.1)) Output Started calculation: My Math works
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
