Question: 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

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.

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!