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
Alborosie
4 years ago
10

Pythonpython 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-10 convention. Write a program that prompts the user to enter the first 9 digits and displays the 10-digit ISBN (including leading zeros).
Computers and Technology
1 answer:
Nataly_w [17]4 years ago
4 0

Answer:

Written in Python

print("Enter the first 9 digits: ")

d1 = int(input())

d2 = int(input())

d3 = int(input())

d4 = int(input())

d5 = int(input())

d6 = int(input())

d7 = int(input())

d8 = int(input())

d9 = int(input())

d10 = (d1 * 1+ d2 * 2 + d3 * 3 + d4 * 4 + d5 * 5 + d6 * 6 + d7 * 7 + d8 * 8 + d9 * 9)%11

if d10 == 10:

                                   print(str(d1)+str(d2)+str(d3)+str(d4)+str(d5)+str(d6)+str(d7)+str(d8)+str(d9)+"X")

else:

                                   print(str(d1)+str(d2)+str(d3)+str(d4)+str(d5)+str(d6)+str(d7)+str(d8)+str(d9)+str(d10))

                                   

Explanation:

This line prompts user for input

print("Enter the first 9 digits: ")

The next 9 line gets the first 9 ISBN digits

d1 = int(input())

d2 = int(input())

d3 = int(input())

d4 = int(input())

d5 = int(input())

d6 = int(input())

d7 = int(input())

d8 = int(input())

d9 = int(input())

This calculates the checksum

d10 = (d1 * 1+ d2 * 2 + d3 * 3 + d4 * 4 + d5 * 5 + d6 * 6 + d7 * 7 + d8 * 8 + d9 * 9)%11

The if condition prints the ISBN number by replacing the last digit with X if the checksum is 10 else it appends the original digits

<em>if d10 == 10:</em>

<em>                                    print(str(d1)+str(d2)+str(d3)+str(d4)+str(d5)+str(d6)+str(d7)+str(d8)+str(d9)+"X")</em>

<em>else:</em>

<em>                                    print(str(d1)+str(d2)+str(d3)+str(d4)+str(d5)+str(d6)+str(d7)+str(d8)+str(d9)+str(d10))</em>

<em />

You might be interested in
What is the purpose of the Split command?
liq [111]

Answer:

a split command in the linux system re used for dividing large files into pieces

8 0
3 years ago
Read 2 more answers
Heather is troubleshooting a computer at her worksite. She has interviewed the computer’s user and is currently trying to reprod
Aleksandr [31]

Answer:

D. Identify the problem.

Explanation:

There are six steps or stages in computer system troubleshooting. They are,

1. Identify the problem: In the stage of troubleshooting, the user is interviewed to get a description of the problem. Reproducing the problem is essential to confirm the described problem of the system before moving to the next stage.

2. Establish a theory of probable cause: when the problem is identified, a list of the possible cause of the problem is made.

3. Test the theory to determine a cause: each items on the list of possible cause of the problem is tested to confirm its actual cause.

4. Resolve the problem.

5. Verify full system functionality

6. Document the findings, actions and outcomes.

8 0
4 years ago
3
Yuki888 [10]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

There are some steps that you use to access the subtotal dialog box.

To access the Subtotal dialog box, you need to follow the following steps:

Click the Date tab

In the  Outline group, click Subtotal

to access the Subtotal dialog box.

The Subtotal function used in Excel and return the subtotal of the numbers in a column in a list or database. Subtotal is a builtin function in Excel that used to subtotal the number in a column or in a given database.

4 0
3 years ago
Read 2 more answers
which role validates the users identity when using saml for authentication? rp user agent sp idp see all questions back next que
katrin2010 [14]

A role which validates the user's identity when using Security Assertion Markup Language (SAML) for authentication is: D. IDP.

<h3>What is IDS?</h3>

IDS is an abbreviation for intrusion detection system and it can be defined as a type of information security (IS) system which is designed and developed to monitor network traffic, validates an end user's identity, and notifies the network engineer when there's a malicious activity.

In Cyber security, a role which is saddled with the responsibility of validating an end user's identity when using Security Assertion Markup Language (SAML) for authentication is the intrusion detection system (IDP).

Read more on intrusion detection system here: brainly.com/question/14284690

#SPJ1

Complete Question:

Which role validates the user's identity when using SAML for authentication?

1) IdP. 2) SP. 3) User agent. 4) RP.

5 0
1 year ago
Using PowerPoint or impress guarantees that your presentation will do which of the following
Molodets [167]
It will show a power point on the files or what u make depending on what u are doing.
4 0
3 years ago
Read 2 more answers
Other questions:
  • A(n) ____ database is an application appropriate for an object-oriented database that contains text links to other types of docu
    7·1 answer
  • Which of the following can be used to visually represent information similar to diagrams?
    6·2 answers
  • La computadora es un medio de comunicacion moderno?
    8·1 answer
  • Which one of the following items would you be most likely to keep in a database? A. Payroll records B. Address book C. Financial
    7·1 answer
  • Which option will automatically update copied data?
    12·2 answers
  • Which of the following is a scam in which a perpetrator sends an official looking e-mail that attempts to obtain a user’s person
    7·2 answers
  • What does wireless technology use to transmit signals?
    7·1 answer
  • Antwon is building his technical writing portfolio.He created the following checklist: •check whether any part of the portfolio
    11·1 answer
  • What is the correct sequence in which a computer operates​
    6·1 answer
  • Verizon's implementation of a web-based digital dashboard to provide managers with real-time information such as customer compla
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!