Question: please see below pics Account Validation When a passenger purchases a ticket the ticket contains an account number. Subsequently when the ticket is scanned for

please see below pics

please see below pics Account Validation When a passenger purchases a ticket

the ticket contains an account number. Subsequently when the ticket is scanned

Account Validation When a passenger purchases a ticket the ticket contains an account number. Subsequently when the ticket is scanned for entry to the transit system the account number needs to be validated. Our mechanism for validating account numbers is quite simple, the account number is eight hexadecimal digits, and to ensure validity the last two digits are a checksum which is calculated from the sum of the first six digits You will be provided a list of account numbers as input, such as BBADFeaD You should provide a line of output per line of input that states if the account number is VALID or INVALID Example: Sequence Input Output Notes 8BADF0OD INVALID 8BADFO (hex) 9154032 (decimal) - 941+5+4+0+34 2 24 24 (decimal) 18 (hex) 18-OD therefore INVALID COFFEE1C VALID COFFEE (hex) 12648430 (decimal) 1+2+6+4 8+4+3+0 28 28 (decimal) 1C (hex) 1C1C therefore VALID You may be required to return "INVALID for unexpected data. 1ort fileinput def process 1ine): 25s Line: 2 Col: 1

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!