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
Step-by-step explanation: