Question: give me proper line to line code with execution .. Assignment Portion - hand in once completed pamteries; A crodit card nurnber must have betwecn

Assignment Portion - hand in once completed pamteries; A crodit card nurnber must have betwecn 13 and 16 dirits. ft mard itart with = 4 for Visa cards. a s for Master cands 7 37 for American Fupress cards 6 for Discovcr cards In 1954, Hans Luhn of 1EM profersed an alporithem for validating credit card numbers. The alfocithm is areful to deternise whether a cant number is eniern correctly, or whether a crethil card is scamnod coneuly by a kahser. Prrdif card mumbers are gencralcd felloming this valhality chock, connmely known ai the Luhn cheok or the Mfoul Jo ohrck, which can be decribed as follows ffor iflastro: 1. Doble every mocond digit frum night bo left. If doubler of a difit meadis in a Two-digit temincr, add up the two digits so ger a single sif rit number: 2. No all all sirple digie mancers frum Sivp 1 . 4+4+8+2+3+1+7+8=17 6+6+0+8+0+7+8+1=18 1. Sear ele senala frien Sup 2 and Syp 3 . 37+38=75 sue de lallowieg mactwaln: for Aiturn true if the card Aunter is wile " sublie atatie boslean tavalid(tong nater). 1" bat the revait trie step 2iof poblte statie tat vaderbobletionglase(hew natber? palte atatie tat ofteration that notar) poblic atatie ast getsigeitere df. 43sicTociadiojer ferm a38597te1t+seroy is intid
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
