Question: Assignment: Your program will read ISBN numbers from a file as a string. Ignore any dashes or skipped lines and convert all digits to integers.

Assignment: Your program will read ISBN numbers from a file as a string. Ignore any dashes or skipped lines and convert all digits to integers. Pass all integers except for the last one (yes, theres a lot of them) to a function (defined outside of your main function) that will calculate the check digit. Return the check digit calculated. Back in the main function, determine if the ISBN is valid or not (the returned value should be equal to the last integer). If it is not, print the incorrect ISBN to the screen. For testing purposes, try your function with the ISBN of your textbook. Then try it with 978-0-596-80237-0. It should work with both.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!