Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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