Please anyone be kind to help me answer this question. I will be so…
Question Answered step-by-step Please anyone be kind to help me answer this question. I will be so… Please anyone be kind to help me answer this question. I will be so grateful. In this activity, you will implement a function that determines whether or not a card number is valid, according to some simple algorithms. Note that these algorithms are purely made-up; don’t try to use them to create fake credit card numbers! 🙂 We will assume that the credit card number is a string consisting of 14 characters and is in the format ####-####-####, including the dashes, where ‘#’ represents a digit between 0-9, so that there are 12 digits overall. We will revisit this assumption in the an optional later activity. In the space below, implement a function called “verify” that takes a single parameter called “number” and then checks the following rules: The first digit must be a 4. The fourth digit must be one greater than the fifth digit; keep in mind that these are separated by a dash since the format is ####-####-####. The sum of all digits must be evenly divisible by 4. If you treat the first two digits as a two-digit number, and the seventh and eighth digits as a two-digit number, their sum must be 100.Image transcription textdef verify(number) : # do not change this line! # write your code here so that it verifies the card number # besure to indent your code! return True # modify this line as needed input = “5000-0000-0000” #change this as you test your function 10 output = verify(input) # invoke the method using a test in… Show more… Show more Answer :def verify(number): #your code here Computer Science Engineering & Technology Python Programming CIS 192 Share QuestionEmailCopy link Comments (0)


