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
Each time the enter key is pressed, word creates a new paragraph. (points : 2) true false
ludmilkaskok [199]
Your answer would be true
6 0
3 years ago
Edhesive intro to CompSci Test 7 answers pls
algol13

Answer:

nothing

Explanation:

nothing

6 0
3 years ago
Create a single line comment that says ""Print results to screen""
levacccp [35]

Answer:

//""Print results to screen""

Explanation:

In c,c++,java,javascript // is used for the single line comment.

syntax:- // comment.

Whatever text that is followed after // is commented means this line will not get executed by the compiler.

Comments are used to explain the code to other person who is working on the code or trying to understand that code.

6 0
3 years ago
Name the technique that uses a scheme to sum the individual digits in a number and stores the unit's digit of that sum with the
Artemon [7]

Answer:

Parity Bit

Explanation:

Given that Parity bit is a form of strategy or method that utilizes a scheme in adding a solitary bit to a binary string. This can be either 1 or 0, thereby making the total quantity of bit to become either odd parity bit or even parity bit during storage.

Hence, the technique that uses a scheme to sum the individual digits in a number and stores the unit's digit of that sum with the number is called PARITY BIT.

7 0
2 years ago
I have a question about my HP Laptop
vekshin1
What exactly is your question?
7 0
3 years ago
Other questions:
  • the task is to ask the user for three numbers and find the average which pseudocode gives you the comment outline for task​
    10·1 answer
  • The combination of two or more technologies or data feeds into a single, integrated tool is referred to as a _____.
    7·1 answer
  • What is the Kali Linux's kernel?<br><br> Sorry for english, but help me.
    12·1 answer
  • In a eukaryotic cell, DNA is found in
    12·2 answers
  • Which two components in a system might make a loud whining noise when there is a problem? Why?
    14·1 answer
  • Write a java program that would request user name, id number, and state the time the user has reported at work.​
    12·1 answer
  • In the 1880’s advancements in technology and processes made photography available to the general public. Who is considered the m
    12·1 answer
  • define a computer, state its 3 main activities with examples of the functions of each of those activities​
    7·1 answer
  • What is the core function of an enterprise platform
    12·2 answers
  • Ncomputing and thin client<br>what it is <br>why is done , how it works and how it's <br> done ​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!