Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use python Part 3: Tolerance sizes. Keep in mind that the larger the tolerance, the more numerical error you can tolerate. A large enough

image text in transcribed

Please use python

Part 3: Tolerance sizes. Keep in mind that the larger the tolerance, the more numerical error you can tolerate. A large enough tolerance can catch almost any numerical errors. However, this also increases the chances of mistakenly identifying two things that should not be the same as being identical. Finally, add one more section to your program. You may reuse any of the examples from the earlier parts in this section, as you wish You want to create two pairs of numbers: a and b, and x and y, along with a tolerance value (you may use different names for your variables). Print a line to clearly separate this part of the program from the earlier parts. You should output all values: a, b, x, y, and the tolerance. You should output True or False as to whether a and b are within tolerance, and whether x and y are within tolerance Numbers a and b should be two numbers that SHOULD be the same, but are different due to roundoff error. Feel free to reuse examples from part 1. Numbers x and y should be two numbers that SHOULD NOT be the same, but are close to each other You should have a tolerance value that is of a size so that a and b are NOT within tolerance of each other, but x and y ARE within tolerance of each other o Obviously, if you set a tolerance value large enough, you could find that all were within tolerance of each other o And, if you set a small enough tolerance (like 0), you would find that neither is within tolerance o The point of this exercise is to demonstrate to you that you can have cases where tolerances will fail on both sides: they might be too small to catch the cases they should, but too large to exclude cases that shouldn't be the same

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

(a) all strings with exactly one a

Answered: 1 week ago