<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Introduction to Functional Programming
What is Functional Programming
Functional programming is a programming paradigm that revolves around pure functions. 
Pure function
A pure function is a function which can be represented as a mathematical expression. That means, no side-effects should be present, i.e. no I/O operations, no global state changes, no database interactions. 
<img src="files/PureFunction.png" width="500" alt="Pure Function Representation">
The output from a pure function is depended ONLY on its inputs. Thus, if a pure function is called with the same inputs a million times, you would get the same result every single time.
Step1:  In the above example, the output of the function global_sum changed due to the value of a, thus it is unfunctional function.
<ASSISTANT_TASK:>
Python Code:
# not so functional function
a = 0
def global_sum(x):
    global a
    x += a
    return x
print(global_sum(1))
print(a)
a = 11
print(global_sum(1))
print(a)
# not so functional function
a = 0
def global_sum(x):
    global a
    return x + a
print(global_sum(x=1))
print(a)
a = 11
print(global_sum(x=1))
print(a)
Explanation: Introduction to Functional Programming
What is Functional Programming
Functional programming is a programming paradigm that revolves around pure functions. 
Pure function
A pure function is a function which can be represented as a mathematical expression. That means, no side-effects should be present, i.e. no I/O operations, no global state changes, no database interactions. 
<img src="files/PureFunction.png" width="500" alt="Pure Function Representation">
The output from a pure function is depended ONLY on its inputs. Thus, if a pure function is called with the same inputs a million times, you would get the same result every single time.
End of explanation
# a better functional function
def better_sum(a, x):
    return a+x
num = better_sum(1, 1)
print(num)
num = better_sum(1, 3)
print(num)
num = better_sum(1, 1)
print(num)
Explanation: In the above example, the output of the function global_sum changed due to the value of a, thus it is unfunctional function.
End of explanation
<END_TASK>