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
Use the Windows ________ to check on a nonresponsive program. Select one: A. Backup utility B. Task Manager C. System Restore D.
Nitella [24]
The answer is task manager. You can access it by pressing the Windows key and searching "task manager". You can also press ctrl+alt+delete or ctrl+shift+esc to access it.

Taskanager will show you all the applications currently running and how many resources they are using. If a task is unresponsive, it can be force closed from task manager.
4 0
3 years ago
Functions are ideal for use in menu-driven programs. When a user selects a menu item, the program can_______ the appropriate
Masteriza [31]

Answer:

a. call

Explanation:

According to my research on function, I can say that based on the information provided within the question the program can call the appropriate function. A function is a piece of code that completes a single task when called upon. Calling is another way of just saying that your telling the function to run its code at that given moment.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

4 0
3 years ago
Who else doin online school
ella [17]

I've been doing it for about.... 4 years now? Maybe 3.

7 0
3 years ago
Read 2 more answers
Select the three business advantages of globalization.
Anna007 [38]

Answer:

There is increased collaboration in problem solving.

There are increased business opportunities.

It facilitates ease in communication

4 0
4 years ago
Python Programming
Phoenix [80]

The python program that creates a Bankaccount class for a Bank ATM that is made up of the customers and has a deposit and withdrawal function is given below:

<h3>Python Code</h3>

# Python program to create Bankaccount class

# with both a deposit() and a withdraw() function

class Bank_Account:

def __init__(self):

 self.balance=0

 print("Hello!!! Welcome to the Deposit & Withdrawal Machine")

def deposit(self):

 amount=float(input("Enter amount to be Deposited: "))

 self.balance += amount

 print("\n Amount Deposited:",amount)

def withdraw(self):

 amount = float(input("Enter amount to be Withdrawn: "))

 if self.balance>=amount:

  self.balance-=amount

  print("\n You Withdrew:", amount)

 else:

  print("\n Insufficient balance ")

def display(self):

 print("\n Net Available Balance=",self.balance)

# Driver code

# creating an object of class

s = Bank_Account()

# Calling functions with that class object

deposit()

s.withdraw()

s.display()

Read more about python programming here:

brainly.com/question/26497128

#SPJ1

8 0
2 years ago
Other questions:
  • 4. Name and fix the two errors in the following piece of code that is intended to print “Debugging is fun!”. print //(“Debugging
    11·1 answer
  • Which if the following is an example of tangible property?
    7·1 answer
  • How many bits are required to address a 1mx8 main memory if main memory is byte addressable?
    6·1 answer
  • A standard science experiment is to drop a ball and see how high it bounces. Once the bounciness of the ball has been determined
    10·1 answer
  • When you tap or click the ____ button for a selected graphic, Word provides options for changing how a graphic is positioned wit
    5·1 answer
  • Imagine that you have configured the enable secret command, followed by the enable password command, from the console. You log o
    9·1 answer
  • What happens if i unplug my alarm system?
    11·1 answer
  • Read the following scenario, and then decide if you should upgrade the computer. You have a desktop that you use primarily for w
    7·1 answer
  • Look over the image in the top section and choose which piece from the bottom should be placed in the question mark (?) that wou
    11·1 answer
  • A/an _____________ is a stored program that executes at a specified time. Group of answer choices stored procedure view trigger
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!