LearnPy Hub
← Functions problems
Medium

Apply a Function Twice

Write twice(f, x) that returns f(f(x)). Read n and print twice(lambda v: v * 3, n) and twice(lambda v: v + 10, n) on two lines.

Input

One integer.

Output

Two lines.

Sample 1

Input
2
Output
18
22

Sample 2

Input
0
Output
0
20
solution.py
Output appears here
Apply a Function Twice · Python practice problem · LearnPy Hub