Problem Set 10: Credit Card

Web-CAT: Submit Python programs to this automated grading platform.

Task Outline

Background Theory

Example Case

3\underline{7}8\underline{2}8\underline{2}2\underline{4}6\underline{3}1\underline{0}0\underline{0}5
\textbf{7}\cdot{2} + \textbf{2}\cdot{2} + \textbf{2}\cdot{2} + \textbf{4}\cdot{2} + \textbf{3}\cdot{2} + \textbf{0}\cdot{2} + \textbf{0}\cdot{2}
14 + 4 + 4 + 8 + 6 + 0 + 0
1 + 4 + 4 + 4 + 8 + 6 + 0 + 0 = 27
27 + 3 + 8 + 8 + 2 + 6 + 1 + 0 + 5 = 60

Hints

3\underline{7}8\underline{2}8\underline{2}2\underline{4}6\underline{3}1\underline{0}0\underline{0}5
\underline{5}1\underline{0}5\underline{1}0\underline{5}1\underline{0}5\underline{1}0\underline{5}1\underline{0}0

Code Distribution

Description File Size File Name
Python Source Code for Credit Card 1.4KB pset10.zip

Contents of pset10.zip:

PSet10CreditCard/
├── creditcard.py
└── testcreditcard.py

Specification

Testing

Submission