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
stellarik [79]
3 years ago
9

(Business: check ISBN-10) An ISBN-10 (International Standard Book Number) consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. The last

digit d10, is a checksum, which is calculated from the other nine digits using the following formula: (d1 * 1 + d2 * 2 + d3 * 3 + d4 * 4 + d5 * 5+ d6 * 6 + d7 * 7 + d8 * 8 + d9 * 9) % 11 If the checksum is 10, the last digit is denoted as X, according to the ISBN convention. Write a program that prompts the user to enter the first 9 digits as a string and displays the 10-digit ISBN (including leading zeros). Your program should read the input as a string. Here are sample runs: Enter the first 9 digits of an ISBN-10 as a string:013601267 The ISBN-10 number is 0136012671 Enter the first 9 digits of an ISBN-10 as a string:013031997 The ISBN-10 number is 013031997X
Computers and Technology
1 answer:
Aneli [31]3 years ago
7 0

Answer:

 The solution code is written in Python 3

  1. digits = input("Enter 9 digits: ")
  2. multiplier = 1
  3. total = 0
  4. for x in digits:
  5.    total += int(x) * multiplier  
  6.    multiplier += 1
  7. checksum = total % 11  
  8. if(checksum == 10):
  9.    print(digits + "X")
  10. else:
  11.    print(digits + str(checksum))

Explanation:

Firstly, use input function to get user input for 9 digits (Line 1)

Next we can use a for-loop to estimate the summation (d1 * 1 + d2 * 2 + d3 * 3 + d4 * 4 + d5 * 5+ d6 * 6 + d7 * 7 + d8 * 8 + d9 * 9) ( Line 6-8)

Then only apply % operator to get the remainder of total and get the checksum (Line 10)

Next create if and else statement to print the digits string joined with X if checksum is 10 else join digits string with checksum value (Line 12 -15)

You might be interested in
Describe PROM, EPROM and EEPROM memories​
skelet666 [1.2K]

Answer:

Explanation:

PROM is a Read Only Memory (ROM) that can be modified only once by a user while EPROM is a programmable ROM that can be erased and reused. EEPROM, on the other hand, is a user-modifiable ROM that can be erased and reprogrammed repeatedly through a normal electrical voltage.

7 0
3 years ago
when a stock or bond certificate is delivered, it must be in good transferable form. if the certificate is badly mutilated, it m
Elena-2011 [213]

Authentication can be done by the issuer of the security.

What do you mean by authentication?

Authentication is the act of proving an assertion, such as a computer system user's identification. Authentication is the process of verifying a person's or thing's identity, as opposed to identification, which is the act of indicating that identity. It could entail validating personal identification documents, verifying the authenticity of a website with a digital certificate, carbon dating an artefact, or guaranteeing that a product or document is not counterfeit.

Only a party with access to particular company documents may authenticate a mutilated certificate. It is most likely the issuer, but it could also be the transfer agent or registrar.

To learn more about authentication
brainly.com/question/28240257

#SPJ4

6 0
1 year ago
What are the reasons why is it necessary to evaluate online sources and content?
marissa [1.9K]
1) You don't know if the source is reliable. 
2) It is better to cite reliable sources so.
7 0
3 years ago
What is a true job in the information age?​
Gelneren [198K]

Answer:

apple

you get a lot of information about the technology you paid for.

if this was not helpful comment and I’ll fix it!

3 0
3 years ago
Create a new method in your language called Times Print. This should be a void method. It should accept exactly two numeric valu
user100 [1]

Answer:

The code commented is given below, also the lines that start with # are comments that explains the code.

# Create a function named times_print that receives 2 values x and y

def times_print(x, y):

   # Print the formatted string

   print("The value of {} times {} is {}".format(x,y,x*y))

# Create the main function

def main():

   # Call the funciton times_print 3 times with different values

   times_print(2,3)

   times_print(4,5)

   times_print(5,6)

# Execute the main function

main()

Explanation:

The code was written using Python 3.5, and here I attach the screenshots of the program running:

8 0
3 years ago
Other questions:
  • You have been asked to create an authentication security plan for your company. Which of the following components would you inco
    14·1 answer
  • Create a Python program as described below and save it in a file named bool. You should use IDLE or similar environment to creat
    15·1 answer
  • What view and zoom setting do you need for true WYSIWYG display? Why?
    14·1 answer
  • Which of the following domain types is most trustworthy 1) .com 2) .tv 3).org 4) .edu
    15·2 answers
  • How do you change brightness on acer laptop?
    7·1 answer
  • Which port-authentication network access control standard forces devices to go through a full authentication, authorization, and
    13·1 answer
  • Incident damage ____ is the rapid determination of the scope of the breach of the confidentiality, integrity, and availability o
    6·1 answer
  • What are the most common types of cables in a network?
    6·1 answer
  • How does the Evaluate Formula dialog box help fix errors?
    9·2 answers
  • How many hours do you spend on the Internet per day?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!