what do you mean by function?
Answers
Answer:
A function is a block of organized, reusable code that is used to perform a single, related action. ... Different programming languages name them differently, for example, functions, methods, sub-routines, procedures, etc.
Explanation:
hpoe it's helpful
Answer:
A technical definition of a function is: a relation from a set of inputs to a set of possible outputs where each input is related to exactly one output.
This means that if the object x is in the set of inputs (called the domain) then a function f will map the object x to exactly one object f(x) in the set of possible outputs (called the codomain).
The notion of a function is easily understood using the metaphor of a function machine that takes in an object for its input and, based on that input, spits out another object as its output.
A function is more formally defined given a set of inputs X (domain) and a set of possible outputs Y (codomain) as a set of ordered pairs (x,y) where x∈X (confused?) and y∈Y, subject to the restriction that there can be only one ordered pair with the same value of x. We can write the statement that f is a function from X to Y using the function notation f:X→Y.
Explanation:
I hope it's helpful for you