Consider the piece-wise function given below.
f(x) = x + 2 if 0 < x < 10
f(x) = x ** 2 + 2 if 10 <= x
f(x) = 0 otherwise
Accept the value of x as input and print the value of f(x) as output.
Note that both the input and the output are real numbers, and your code should
reflect this: x and f(x) should both be float values. In particular, the
third case must print 0.0 and not 0.
Input
A single line containing a real number.
Output
A single line: the value of f(x) as a float.
Example
Input:
5
Output:
7.0
Write a complete program: read the input with input() and print the result with print().
Input
5
Output
7.0