We have created two different modules with functions with the same names, but different results, on this notebook we will see the difference,
First, let us import them with different alias.
import mod1 as m1
import mod2 as m2
print(dir(m1),dir(m2))
There are the functions Fib and Sum with the same names on both modules.
Sum function¶On the case of the first module, the function Sum return a string result of summing the string-converted parametersm
print(type(m1.Sum(1.,2.)),m1.Sum(1.,2.))
While on the second file, it converts to int and return the sum
print(type(m2.Sum(1.,2.)),m2.Sum(1.,2.))
Fibfunction
This function on the first case returns the $n^{\text{th}}$ number of the Fibonacci recursion while on the second returns a list including the previous.
m1.Fib(10)
m2.Fib(10)