Process ops: an integer is a score; 'C' cancels the last, 'D' doubles the last, '+' sums the last two. Return the total.
Write cal_points(ops).
Starter:
def cal_points(ops):
# TODO
pass
Solve it interactively in your browser (no setup), check your answer instantly, and keep your daily streak going on IWTLP: https://iwtlp.com/challenge
Top comments (0)