"""Original hypothesis reconstructed for this practice program only.""" def award_points(tokens, chain, misses): if any(type(n) is not int or not 0 <= n <= 999 for n in (tokens, chain, misses)): raise ValueError('Practice input domain: three integers 0..999') return max(0, min(tokens, 99) * 7 + (50 if chain >= 3 else 0) - misses * 2)