Draft
Credit Card Validifier
253Aweson1
Description:
Make a program that sees if a credit card number is valid or not. Also the program should tell you what type of credit card it is if it is valid.
The five things you should consider in your program is: AMEX, Discover, VISA, Master, and Invalid :
- Discover starts with 6011 and has 16 digits,
- AMEX starts with 34 or 37 and has 15 digits,
- Master Card starts with 51-55 and has 16 digits,
- VISA starts with 4 and has 13 or 16 digits.
Examples
Ex: Input: 6011364837263748 --> Output: "Discover"
Ex: Input: 5318273647283745 --> Output: "MasterCard"
Ex: Input: 12345678910 --> Output: "Invalid"
Ex: Input: 371236473823676 --> Output: "AMEX"
Ex: Input: 4128374839283 --> Output: "VISA"
Similar Kata:
Stats:
Created | Aug 5, 2015 |
Warriors Trained | 430 |
Total Skips | 41 |
Total Code Submissions | 693 |
Total Times Completed | 253 |
Python Completions | 253 |
Total Stars | 5 |
% of votes with a positive feedback rating | 87% of 84 |
Total "Very Satisfied" Votes | 69 |
Total "Somewhat Satisfied" Votes | 8 |
Total "Not Satisfied" Votes | 6 |
Total Rank Assessments | 99 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 1 kyu |
Lowest Assessed Rank | 8 kyu |