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
4.9 Code Practice: Question 4
RideAnS [48]

total = 0

i = 0

while i < 10:

   temp = float(input("Enter Temperature: "))

   total += temp

   i += 1

print("Sum = "+str(total))

I hope this helps!

6 0
3 years ago
Read 2 more answers
1. Conflict resolution is the process of solving disputes and disagreements.
gtnhenbr [62]
1. Conflict resolution is the process of solving disputes and disagreements.

A. True


2. Project managers have the overall responsibility for planning, executing, and completing a project.

A. True


3. Read the following scenario:

A project will require more people than originally estimated.

Identify the possible risks to the project.

B. Money and resources


4 0
3 years ago
How do you change the name on your brainly account?
serg [7]

Answer:

For changing your username you can contact to administrator of the site. If you are using app then go to message option. Then search "rishilaugh" then you can message him. Hope it helps you!

8 0
4 years ago
PLEASE HELP!
Gnom [1K]

Answer:

A. True or false

1.True

2.false

3.false

4.true

5.true

4 0
2 years ago
Read 2 more answers
Its a weird question!
yaroslaw [1]
You are not crazy!
It goes straight to voicemail either way!

Hope this helps!
3 0
3 years ago
Read 2 more answers
Other questions:
  • What are two parts of a cell reference?
    7·1 answer
  • Which command is used to combine two or more cells together into one cell?
    14·2 answers
  • TCO 10) Voice packets could experience a significant _____ delay in routers and switches when sharing a network with data traffi
    15·1 answer
  • Explain the four basic operation performed by every computer​
    11·2 answers
  • The width of a strand of fiber is 19.2 micrometers. if 1500 strands are adhered side by side, how wide would the resulting fabri
    9·1 answer
  • The name of a Variable effects its value<br><br> True<br><br> False
    7·1 answer
  • The larger the Word Size of a computer
    6·1 answer
  • The conversion rate is the percentage of what? A. Customers who received cold calls B. Sales leads who reached the interest stag
    13·1 answer
  • Pls paanswer asap......​
    10·1 answer
  • 4.8.4 Better Sum
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!