- Function is a computation. Data to compute is in input result is an output.
a) 4 b)17 c) 0
3.f(x)=(x/4)-5
a) 4 b)17 c) 0
3.f(x)=(x/4)-5
1- It is a mathematical formula that needs an input to return an output.
2a) 4
2b)17
2c) 0
Thanks! I agree with the readability aspect.
Thank you. This makes perfect sense.
A function is a set of instructions for the execution of a computation.
I am embarrassed to say that I am not sure how to answer this question. Is the definition for this function and different from that of the problem in question 2?
a function is a formula that computes an input and puts out an output
a f(2)
b f(7)
c f(0)
f (X)= (x/4)-5
1 Function takes a input and perform a calculation with it.
2. a) 4
b) 17
c) 0 or error
3. f(x)= x/4 - 5
1: A function is a calculation that gives an output from an input.
2: a) = 4 b) = 17 c) = 0
3: F(x) = (x/4)-5
I understand the whole n=2k (for k) but I thought this was referring to functions, and hence I went down the mathematical function path, rather than the basic math path I never claimed to be bright (I think we’ve established that
For anyone else confused as to which is which:
Even is thus: n = 2K
0 = 2K
===> 0 = 2K
===> 0/2 = K ===> 0 = K ===> 0 is a Whole Number (for which there is no remainder, in this equation). So it is an even number.
Odd is thus: n = 2K + 1
0 = 2K + 1
===> -1 = 2K
===> -1/2 = K ===> -0.5 = K ===> 0.5 is not a Whole Number So zero is not an odd number.
2a) 4
2b) 17
2c) 0 or error
A function takes an input, performs operations/computations based on this input and any function parameters, and gives results as an output.
A) 4
B) 17
C) 0
f(x) = (x/4) -5
In the second question you had to provide answers for the defined formula. In the third you must specify the formula based on provided instructions.
These are incorrect unfortunately. If X is even you must square it and if its odd you must add 10.
0 is an even number so no error.
Sorry! I didnt read the question properly.
Describe what a function does in your own words
A mathemetical function applies math operators to an input variable and produces a result.
Calculate the output of the following function
f(x) = {
x^2 if x is even
x+10 if x is odd
}
What will be the output for the following inputs?
a) f(2) = 4
b) f(7) = 17
c) f(0) = 0