Hard
Objects You Can Call
Write
class Multiplier with a factor and __call__(x) returning x times the factor, and class Pipeline that holds callables and, when called, passes the value through each in order. Read factors on one line and a starting value; print the result of the pipeline built from Multipliers.Input
Factors; then a value.
Output
One integer.
Sample 1
Input
2 3 4 1
Output
24
Sample 2
Input
5 10
Output
50
Output appears here