Solved: Charge Account Validation
Charge Account Validation
Write a program in Python that will prompt the user to enter an account number consists of 7 digits.
After getting that account number from user, verify if the account is valid or not. You should have a list called current_accts that hold all valid accounts.
Current valid accounts are shown below and you must use them in your program.
5679034 8232322 2134988 6541234 3984591 1298345 7849123 8723217
Verifying the account number entered should be done in a function called check_account() that will accept the account entered by the user and also the list current_accts. This function should return a 1 if account is valid otherwise return 0 if account is not valid.
A sample run could be like this:
Enter an account number : 8723918
Account 8723918 is NOT valid.
Another possible sample run could be like this:
Enter an account number : 2134988
Account 2134988 is valid