Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Management Expert

The last digit of a credit card number is the "check digit" that protects against errors. For simplicity we will use credit cards with just 8 digits instead of 16. The user will input the 8 digit credit card number as a string and you will convert it to a list using the list() function. You need to validate the length of the string entered. If it is less than or greater than 8 characters, ask for another string. Validate the credit card number that you receive according to the following rules:

  1. Starting from the rightmost digit, form the sum of every other digit - for example, if the credit card number is 43589795 then you form the sum 5 + 7 + 8 + 3 = 23.
  2. Double each of the digits that were not included in the preceding step. Add all digits of the resulting numbers. For example, with the number given above, doubling the digits starting with the next-to-last one, yields 18 18 10 and 8. Adding all the digits in these values results 1 + 8 + 1 + 8 + 1 + 0 + 8 = 27.
  3. Add the sums of the two preceding steps. If the last digit of the result is 0, the number is valid. In the example, 23+ 27 = 50 so the number is valid.

Business Management, Management Studies

  • Category:- Business Management
  • Reference No.:- M92519845
  • Price:- $15

Priced at Now at $15, Verified Solution

Have any Question?


Related Questions in Business Management

The department of justice is involved against monopolies

The Department of Justice is involved against monopolies, are there two current cases and why has the Department of Justice taken cation against each of them?

Explain the virtual integration of crm scm and e-erp

Explain the virtual integration of CRM, SCM, and e-ERP systems in the organisation

Mr barney the ceo has received your memo request to be

Mr. Barney, the CEO, has received your memo request to be considered for further leadership positions. He has decided to put you to the test! He assigns you to help his Director of Payroll, Loretta Cash with a problem.  ...

How can a organisation move forward in the community to be

How can a organisation move forward in the community to be a leader in diversity. Discuss: - How you'll develop work plans to incorporate diverse workforce members into the plan. - Why you would make changes to work plan ...

Identify three leadership traits from the trait theory you

Identify three leadership traits from the Trait Theory you feel you do or do not possess. You may identify three that you do possess, or three that you do not possess, or one you possess and two you do not possess, etc. ...

List an organization that you believe has recently

List an organization that you believe has recently undertaken a proactive change. List an organization that you believe has recently undertaken a reactive change. For these questions below, consider a past or current wor ...

Research on the web ideas for small businesses for students

Research on the web ideas for small businesses for students. Describe at least three different ideas and include what for of business ownership you would use to structure each business.

How to make a piece of mips assembly code that counts

How to make a piece of MIPS assembly code that counts number of 1s in the binary representation of the value stored in $t0 and saves the result in $t1?

This is some code i have been working on it is a menu with

This is some code I have been working on. It is a menu with an option to input employee information and a table to view it in. The code works for the most part - except after you have filled the maximum number of employe ...

How does diversity affect social justicewhat adjustments

How does diversity affect Social justice? What adjustments need to be made to facilitate participation by people with a disability in a workplace?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As