1def make_multiplier_of(n):
2 def multiplier(x):
3 return x * n
4 return multiplier
5
6
7# Multiplier of 3
8times3 = make_multiplier_of(3)
9
10# Multiplier of 5
11times5 = make_multiplier_of(5)
12
13# Output: 27
14print(times3(9))
15
16# Output: 15
17print(times5(3))
18
19# Output: 30
20print(times5(times3(2)))