I never learned a lot of mathematics (generally only arithmetic) and never learned computer science in a formal frame.
I emphasize that I don't mean to ask about a "function" in programming ("procedure"/"method"), rather only about the difference between the formal definition of function in mathematics to the formal definition of function in (theoretical) computer science, if at all there is any such difference (unless computer science don't share the exact definition common in mathematics).
Is there difference between a function in mathematics to a function in computer science?
random.random()
is unequivocally called a function in its documentation and when people refer to it, but violates most of the mathematical properties of a function. $\endgroup$