Draft

Credit Card Validifier

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"

Stats:

CreatedAug 5, 2015
Warriors Trained430
Total Skips41
Total Code Submissions693
Total Times Completed253
Python Completions253
Total Stars5
% of votes with a positive feedback rating87% of 84
Total "Very Satisfied" Votes69
Total "Somewhat Satisfied" Votes8
Total "Not Satisfied" Votes6
Total Rank Assessments99
Average Assessed Rank
6 kyu
Highest Assessed Rank
1 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • Aweson1 Avatar
  • ZozoFouchtra Avatar
Ad