Starting from the rightmost digit

Assignment Help Business Management
Reference no: EM131711151

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.

Reference no: EM131711151

Questions Cloud

Discuss activities do for mental, emotional health : what they are missing out on by spending so much time with these everyday "outlets." What might they be doing instead and what might those other activities
Current string into a new string : At each stage of the game the user may apply one of the following rules to change their current string into a new string. use python
Provides polaris the greatest cost advantage : Which location provides Polaris the greatest cost advantage? Calculate the NPV of the three locations using a 10% discount rate.
Provide substantiated data about social media for business : Your business partner has just returned from a conference in which social media was promoted for communicating with business customers.
Starting from the rightmost digit : 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.
Many of the ancient stories that we have read feature : Many of the ancient stories that we have read feature miracles, stupendous events or activities that we would normally consider beyond the reach of mortals
Explain the core principles of information assurance : Compare and contrast the core principles of information assurance and prioritize in the order each in your own opinion (Support your opinion).
What type of visual aids to use for a particular situation : What factors need to be taken into consideration when determining what type of visual aids to use for a particular situation
Telecommunication applications and services : Discuss the following telecommunication applications and services: (i) Caller ID, (ii) Automatic Call Distribution, (iii) Automated Attendance

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd