Ten digit ISBN numbers are created so that the first nine digits are information digits and the last digit is a check digit. This last number helps people notice and correct mistakes that might be made in recording the information digits. The same is true for thirteen digit ISBN numbers. Here is a ten digit ISBN number: 0-13-149498-8. The digit 0 indicates the book is written for English- speaking people. The number 13 and the number 149498 identify the publisher and the book published by that publisher. The last digit, the 8, is the check digit. It was chosen in the following way: each digit is given a weight by using the digits 1 to 10 and counting left to right. These weights are added. The sum is:
0(1) + 1(2) +3(3) + 1(4) + 4(5) + 9(6) + 4(7) + 9(8) + 8(9) +
(The digits of the ISBN information numbers are listed in order from left to right and weighted by counting up from 1 to 9.) The check digit is chosen to be a number from 0 to 10 so that this weighted sum is a multiple of 11. That is, the sum must be divisible by 11. (If the check digit turns out to be 10 then in this case an X is displayed representing the Roman numeral for 10.)
Let us see what sum we have so far with these particular nine information digits: 0(1) + 1(2) +3(3) + 1(4) + 4(5) + 9(6) + 4(7) + 9(8) + 8(9)
= 0 + 2 + 9 + 4 + 20 + 54 + 28 + 72 + 72
= 261
The check digit 8 was chosen because 261 is between 253 and 264 (multiples of 11) and 261 is 8 more than 253. The only possible number from 0 to 10 to use as a check digit is 8. Thus we have: A ten digit ISBN number: 0-13-149498-8
If you know the ten digit ISBN number you can calculate the thirteen digit ISBN number. Simply start the thirteen digit ISBN number with 978, then re-calculate the check digit. For example, 0-13-149498-8 becomes 978-0-13-149498-? Calculating the check digit for the thirteen digit ISBN number is done differently than for the ten digit ISBN number. Below is the way to calculate the thirteen digit ISBN check digit.
Note that on a thirteen digit ISBN number the weighted numbers are different: 1 3 1 3 1 3 1 3 1 3 1 3
9(1) + 7(3) + 8(1) + 0(3) + 1(1) +3(3) + 1(1) + 4(3) + 9(1) + 4(3) + 9(1) + 8(3) + =9 + 21 + 8 + 0 + 1 + 9 + 1 + 12 + 9 + 12 + 9 + 24 =115
The sum must be divisible by 10 for a thirteen digit ISBN. The check digit 5 was chosen because 115 divided by 10 is 11 with remainder 5. The remainder is the check digit. Thus we have:
A thirteen digit ISBN number: 978-0-13-149498-5.
Write a python program which displays a simple menu as follows:
Python ISBN Conversion Menu
Verify the check digit of an ISBN-10
Verify the check digit of an ISBN-13
Convert an ISBN-10 to an ISBN-13
Convert an ISBN-13 to an ISBN-10
Exit
Please remember to use what you have learned during the semester such as:
Functions and/or Value Returning Functions
If structures or logic structures IF/Elif/ELSE
Data structures i.e. File input/output
String manipulations i.e. string slicing and lists,
Modules
Loops i.e. WHILE loops or FOR loops
Reading and writing data to a file(s)
67 Answers
60 Answers
DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Functions and Arrays – to solve computationalproblems.Arrays provide a convenient way to store &
The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is anPath finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going through certain obstacles. As the main aim is to thinkabout path finding, we focus on the common task
Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individualDevelop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. TheLineItem class will represent an individual line item of merchandise that acustomer is purchasing.
SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define: SeaPortProgram e
Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define: SeaPortProgram e
The first programming project involves writing a program that parses, using recursive descent, a GUI definition language defined in an input file and generates the GUI that it defines. The grammar for this language is defined below:1Project 1The first programming project involves writing a program that parses, using recursive descent, a GUIdefinition language defined in an input file and generates the GUI that it defines. The grammar for thislanguage is defined below:gui ::= Wi
CMSC 335 Project SeaPort Solved Project 3 Introduction the SeaPort Project series For this set of projects for the course we wish to simulate some of the aspects of a number of Sea PortsCMSC 335 Project SolvedProject 3 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:
CMSC 335 Project 4 Solved SeaPort Introduction the SeaPort Project series For this set of projects for the course we wish to simulate some of the aspects of a number of Sea Ports Here are the classes and their instance variables we wish to defineProject 4 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define: SeaPortProgram ext
CMSC 451 Project 2 Solved The second project involves completing and extending the C++ program that evaluates statements of an expression language contained in the module 3 case studyProject 2 The second project involves completing and extending the C++ program that evaluates statements of an expression language contained in the module 3 case study. The statements of that expression language consist of an arithmetic expression f
CMSC 451 Project 1 Solved The first project involves benchmarking the behavior of Java implementations of one of the following sorting algorithms bubble sort selection sort insertion sort Shell sort, merge sort quick sort or heap sortCMSC 451 Project 1The first project involves benchmarking the behavior of Java implementations of one of thefollowing sorting algorithms, bubble sort, selection sort, insertion sort, Shell sort, merge sort,quick sort or heap sort. You must post your
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.
Get Free Quote!
267 Experts Online