Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

write a program that asks the user for a 9-digit integer, computes its checksum, and then prints the corresponding ISBN number. The International Standard

write a program that asks the user for a 9-digit integer, computes its checksum, and then prints the corresponding ISBN number.


 

The International Standard Book Number (ISBN) is a 10-digit code that uniquely specifies a book. The rightmost digit is a checksum digit that can be uniquely determined from the other 9 digits, from the condition that d1 + 2d2 +3d3 + ... + 10d10 must be a multiple of 11 (here di denotes the ith digit from the right).


 

The checksum digit d1 can be any value from 0 to 10. The ISBN convention is to use the character X to denote 10.


 

The checksum digit corresponding to 032149805 is 4 since 4 is the only value of x between 0 and 10 (both inclusive), for which 10·0 + 9·3 + 8·2 + 7·1 + 6·4 + 5·9 +4·8 +3·0 + 2·5 + 1·x is a multiple of 11.


 

Sample runs would be as follows.


 

  • Sample run 1:

Please enter a nine digit integer: 013376940

The corresponding ISBN number would be 0133769402.


 

  • Sample run 2:

Please enter a nine digit integer: 013376947

The corresponding ISBN number would be 013376947X


 

Step by Step Solution

3.61 Rating (166 Votes )

There are 3 Steps involved in it

Step: 1

Solution You can create a Python program to calculate the ISBN10 checksum and print the correspondin... 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

Recommended Textbook for

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions

Question

Mention the types of maps

Answered: 1 week ago

Question

Discuss the concept of the retail life cycle as it relates to HSN.

Answered: 1 week ago