Question
We are using Python 3 for this program. American credit card numbers follow a standardized system. All credit card numbers have 16 digits, and the
We are using Python 3 for this program.
American credit card numbers follow a standardized system. All credit card numbers have 16 digits, and the first digit identifies the card brand: Visa cards start with a 4, MasterCard cards with a 5, and Discover with a 6. Write a program that prompts for a credit card number (all mashed together, no spaces/hyphens) and tells the user one of the following:
it is not a valid card number (it is not 16 digits long);
it is a Visa, MasterCard, or Discover;
its brand cannot be determined (it doesn't starting with 4/5/6).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started