Question: Write a Python program that: 1. Asks for a credit card number input as a string without hyphens or spaces, not as a number) OR

Write a Python program that: 1. Asks for a credit card number input as a string without hyphens or spaces, not as a number) OR inputs a number from a text file. 2. Reports the card type (American Express, MasterCard, or Visal. 3. Reports whether the card is valid, that is whether it passes Luhn's Algorithm. If we used the number above, your program should output 4935672384163216........VISA: VALID That is, it should print the credit card number. 8 hyphens, and "VISA: VALID." If the entered number is anything other than a valid CC number, your program should output the number, eight hyphens, and "INVALID NUMBER: TO SUBMIT: your working code, AND a plain text file with one answer per line, for each of the following twenty CC numbers (which include valid and invalid credit card numbers of each type): 4735672384163216 5125131221485655 5451115051163662 349232661988728 4464766795523282 5549984527236360 341714386384157 5365926823264290 5213376389751262 375313685074727 5386622283419322 4225298661212573 5528322935717637 5420050412758076 5345677634360280 4581275409198311 4126427705118053 377734275639344 5141463348206102 5236758703360477
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
