1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
N76 [4]
3 years ago
10

python If the checksum is 10, the last digit is denoted as X according to the ISBN-10 convention. Write a program that prompts t

he user to enter the first 9 digits and displays the 10-digit ISBN (including leading zeros).
Computers and Technology
1 answer:
aksik [14]3 years ago
3 0

Answer:

PYTHON CODE:

str = input("Enter the first 9 digits of an ISBN-10 as a string : ") # user input

i = 1

checksum = 0 # for total sum

while i < 10:

c = int(str[i - 1]) # getting every digit of the ISBN

c = c * i

checksum += c

i=i+1

checksum=checksum % 11 # getting the last digit of ISBN

ch=checksum

if checksum==10: # if the last digit is 10 then change it to X

ch="X"

print("The Complete 10-Digit ISBN is : ",end="")

print(str,end="") # displaying the 9 digit of ISBN

print(ch) # appending the last digit of ISBN

Explanation:

You might be interested in
What is one advantage and disadvantage of designing a support security that might be based on a centralized model, where all sen
defon

Co-Ordination Difficulty: ...
Waste of Resources: ...
Larger Interests of the Enterprise Neglected: ...
Emergency Decision not Possible: ...
Lack of Qualified Managers: ...
Certain Activities Decentralization not Possible:
8 0
2 years ago
Your search google for recipe for tonight dinner is an.example of ?​
Rina8888 [55]

The example is, ethier you need cooking classes or you wish to try something new

Hope the little humor helps

3 0
3 years ago
Read 2 more answers
Many inventions have enabled us to use digital cameras. The biggest difference between traditional and digital cameras is that d
Andreyy89

1 Film Roll Vs SD card.

2 No LCD Display Vs LCD Display

3 No mega Pixels Vs Mega Pixels

4 Zero Optical zoom Vs Optical Zoom

5 No Picture Modes Vs Different Picture Modes

6 Limited Number of Pics per roll Vs unlimited number of pictures depending upon the size of a Card

7 Hassle of developing pictures Vs no hassle, simply transfer them to the pc/laptop

8 Limited features Vs multiple features

hope this helps

8 0
3 years ago
Suppose you are asked to design a rotating disk where the number of bits per track is constant. You know that the number of bits
Olenka [21]

Answer:

suppose i was i would tell them i dont know and walk away

Explanation:

in thoery this is correct

you said suppose so i answerd

there is no use in reporting or getting this taken down

nether is it right

im not stealing points

Because in thoery its an answer

<em><u>THIS IS MY PROTEST</u></em>

6 0
3 years ago
What is the best java 3d modeler library?
LenaWriter [7]
I believe its "Thinking Universe"
5 0
3 years ago
Other questions:
  • When do images or graphics in Microsoft Word hurt the document rather than help
    9·1 answer
  • Define a function below called average_strings. The function takes one argument: a list of strings. Complete the function so tha
    11·1 answer
  • A type of graph that uses horizontal bars to compare data is called a
    15·2 answers
  • Free points,
    15·2 answers
  • Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. T
    11·1 answer
  • Can maybe someone play with me on Over-watch on the Xbox?
    8·1 answer
  • How many passes will it take to find 30 using a binary search?
    6·1 answer
  • Find the output<br>I need it immediately​
    15·1 answer
  • ________ is interpreted. Group of answer choices A. Python B. C C. C D. Ada E. Pascal
    13·1 answer
  • Identify the end-to-end processes that should appear in the process landscape model.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!