IPT Exercises 4.10 #4-10

 4.10 Exercises4. Write programs to calculate:a. the area of a circle of radius 10 m,Chapter 4 : Simple Programs 85b. the annual interest payable on a loan of \$5365.25 at12.5%, andc. the sales tax payable at 7% on a purchase of \$12.50.In the last two examples the answers are not rounded off tothe nearest cent. You can force this by indicating not only thefield size but the numbers of decimal places to be output. Forexample,put 1.66666 : 5 : 2will produce °1.67. The 2 indicates that you want 2 decimalplaces. The last decimal digit is rounded off. Change theprograms for parts b and c to output values to the nearestcent.5. Experiment to see what happens when you specify a field sizewhich is too small to hold a number. For example, try thisprogram.put "How many digits ", 1 / 3 : 5put "What about this?": 86. What happens when you work with very big numbers? Try thisexampleput 32516 * 578632.0Try others. When the result is output, it is in the exponentform, often used in science. Try leaving the decimal point offthe second number.7. What happens when you work with very small numbers. Trythis exampleput 0.0000003 * 0.000006Try others. The exponents or powers of 10 are negative.8. Try a program with the ** arithmetic operatorput 7 ** 2, " is the same as ", 7 * 7The ** is the operator for exponentiation. Try otherexamples.9. Use the exponent form of real numbers in an arithmeticexpression. For example,put 6e5 + 2e2, " is the same as ", 600000 + 200When is the answer output in exponent form? Experimentusing other examples.10.In Turing there are a number of mathematical functionspredefined in the language. Try thisput "The square root of 49 is ", sqrt (49)The sqrt function produces the square root of what follows inparentheses. Try thisput sqrt (371 ** 2)Experiment with the square root function.