Question: Please use python 3 for the following program: User should be able to enter in an account number using the input() method. 1. Beginning with

Please use python 3 for the following program:

User should be able to enter in an account number using the input() method.

Please use python 3 for the following program: User should be able

1. Beginning with the second to right-most digit, modify every other digit moving from right to left as follows: o Double the digit's value. . If the resulting number is a two digit number, add the first digit of that value to the second digit, yielding a single digit number. 2. Add the sum of the modified digits to the sum of the digits from the original sequence which were skipped over in step 1. 3. If the resulting sum is evenly divisible by 10, the sequence is valid. If the resulting sum is not divisible by 10, the sequence is not valued. Example In the case of the number 79927398713, we begin with the second to right-most value (the 1), and double every other digit's value from right to left, with the results as indicated in the shaded squares below: 7 1 Account number | 7 Double every other digit from right to left 7 Sum digits | 7 9 18 9 9 9 9 2 4 4 7 7 7 3 6 6 9 9 9 8 16 7 7 7 2 2 3 3 3 The double digit values (16 and 18) are in turned converted to values 7 and 9 respectively by adding their two digits together, resulting in the sequence in the third row above. The sum of 7 + 9 + 9 + 4 + 7 + 6 + 9 + 7 + 7 + 2 + 3 is 70, which is evenly divisible by 10, so this number is valid. Example In the case of the number 12345675, we begin with the second to right-most value (7), and double every other digit's value from right to left, with the results as indicated in the shaded squares below: Account number Double every other digit from right to left Sum digits | 1 2 2 2 2 2 3 6 6 4 4 4 5 10 1 6 6 6 7 14 5 5 5 5 Adding the digits of 10 and 15 give us 1 and 5 respectively, yielding the sequence in the third row. 2 + 2 + 6 + 4 + 1 + 6 + 5 + 5 = 31, which is not a multiple of 10, so this account number is not valid. Expected results Your program should positively validate the numbers 79927398713, 49927398716, and 1234567812345670. Your program should mark as not valid the numbers 12345675, 49927398717, and 1234567812345678

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!