Question: Please answer this in SCHEME programming language only. 5. An International Standard Book Number is a ten-digit or thirteen-digit number meant to uniquely identify commercially

Please answer this in SCHEME programming language only.
5. An International Standard Book Number is a ten-digit or thirteen-digit number meant to uniquely identify commercially sold books. For ISBN-10 numbers, the first nine digits encode information such as the publisher and the title of the book. The tenth digit is a check-digit and is used to find typo- graphical errors or errors in the transmission of an ISBN-10 number. Given nine digits representing the information related to a particular book, *10X9, X8, X7, X6, X5, X4, X3, X2 determine the check-digit which completes the ISBN-10 number for that book. Start by computing the following sum: 10-X10+9.xg +8 + xy +7+xz +6+Xg+5.45 +4x4+3 -X3+2+xz One useful notation for representing the sum of terms such as these in a concise way is sigma notation. For instance, the same sum expressed in sigma notation is The sigma character indicates we will sum these terms. The index we will use for the terms is i and the range of values we will sum over is the integers from 2 to 10. Finally, each term will be of the form i x;. We will be using sigma notation for some of the problems in this course. To find the check-digit, we need to find the smallest value we can add to the sum above which gives a result that is a multiple of 11. SCHEME provides the modulo function which evaluates to the remainder of integer division. For example: > (modulo 112 11) 2 If we take the sum above modulo 11, we get the remainder of division by 11. We need the value to add to this to get to the next multiple of 11. So, we can just subtract this value from 11. Unfortunately, there is a problem with this solution. If the sum above, let's call it s, happens to be a multiple of 11 already, we should get O for the check-digit. However, (modulo s 11) will evaluate to 0 and 11-O is 11. We can correct this by using the modulo operation one more time. If you like, you can view the very first Numberphile video on YouTube which describes 10 digit ISBN numbers here. It starts by talking about the date the video was released (11-11-11). But, eventually, they do describe ISBN-10 numbers. (a) Write a SCHEME function (isbn10-checkdigit x10 x9 x8 x7 x6 x5 x4 x3 x2) that takes the nine digits corresponding to an ISBN-10 number and computes the value of the corresponding check-digit. b) We can also check that a series of digits encodes a valid ISBN-10 number. Write a SCHEME func- tion, named (is-isbn10? x10 x9 x8 x7 x6 x5 x4 x3 x2 x1), which evaluates to #t if the digits form a valid ISBN-10 number, and #f otherwise. Remember DRY (Don't Repeat Yourself). Your solution to this part should not duplicate any of the code you wrote in part a. In fact, you should apply the function you wrote in part a to determine if the supplied digits correspond to a valid ISBN-10 number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
