Question: The 3 digit card security code (CSC) on a credit card helps to protect against credit card fraud. Write a simple function check_csc (code)

The 3 digit card security code (CSC) on a credit card helps

The 3 digit card security code (CSC) on a credit card helps to protect against credit card fraud. Write a simple function check_csc (code) that checks if a given code is valid. The code is valid if it is three characters long and all the three characters entered are digits between 0 and 9. If the CSC is valid, your function must return True. Otherwise it must return False. Your function should work like this: >>> check_csc ('023') True >>> check_csc ('23') False >>> check_csc ('Ab3') False >>> check_csc('') False

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 Programming Questions!