Homework on Functions - Questions

  1. Takes n number of inputs and may perform some processing or calculations before returning any output.

2, a. 4. b. 17 c. 0

Whoops missed this one…3. Write the definition of a function f that takes an input x, divides it by four and then outputs that result subtracted by 5.
f(x)=x/4-5.

f(x) = (x/4)-5

1 Like

I think there is a mistake in your answer because when you raise any number to the power of 0, the result is 1. so 2^0=1

1 Like
  1. A function takes an input and uses the instructions within that input to produce an output.

a) 4
b) 17
c) 0

  1. f (x) = (x/4)-5
1 Like

0 is an even number, therefore the result is well defined :wink:

Only one of these two is correct, which one? :slight_smile:

No, the formula is defined to square the number X so its correct => 0^2 = 0. :slight_smile:

2 Likes

I put both… because in a function, Zero (0) is both odd and even. It is the axis about which the X plane and the Y plane meet, the vertex where planer values cancel each other.

I am not a Math expert (in 'Murica, we say Math, not maths ;-D) so I am just going with my basic understanding.

Please expound upon the correct answer. [You’ll note I have not looked at the other Students answers yet :slight_smile:

  1. Describe what a function does in your own words
    Returns computed value based on the process scripted on the function
  2. Calculate the output of the following function
  • a) f(2) =4
  • b) f(7) =17
  • c) f(0) =0
  1. Write the definition of a function f that takes an input x, divides it by four and then outputs that result subtracted by 5.
    f(x) = {
    x=x/4
    x=x-5
    }
1 Like

1 A function takes an input, describes theses functions to make an output

2 4
17
0

  1. f(x) = x / 4 - 5
1 Like
  1. It is how two values (input and output) and related to each other, in computer science I see it as a block that have input data and do an action following the rules set by the programmer.

  2. a) 4, b) 17, c) 0.

  3. f(x) = x/4 - 5

1 Like
  1. Defines a problem in math language

a) 4
b) 17
c) 0
3. f(x)= (x/4)-5

1 Like
  1. it’s a conditional system that transform one variable into another if suit the condition pre establish.

  2. a) F(2) = 4
    b) F(7) = 17
    c) F(0) = 0

  3. F(x) = (x/4) - 5

1 Like
  1. A function is a mathematical calculation of an input to create an output.

a) 4
b) 17
c) 0

  1. f(x) = x/4-5
1 Like

So, in #3, do I need parenthesis around “x/4”? Because order of operations would tell me to divide x by 4 first anyways…

0 is an even number. Even number is every number which the remainder when dividing by two equals 0 :slight_smile:

No, but it does make the formula more readable imo. :slight_smile:

• FUNCTIONS: - IS A EQUATION YOU SOLVE where x is the variable. YOU HAVE AN INPUT AND AN OUTPUT, IT TELLS THE APPLICATION HOW TO PERFORM A CERTAIN TASK

4, 17, 0

‘f(x)=(x/4)-5

1 Like
  1. A function is a relation between two sets of numbers. The input will be computed to an output based on the pre-set rules of the function

  2. 4, 17, 0

  3. f(x)= x/4-5

1 Like
  1. A function is a set of parameters defined in order to calculate for a variable such as “X”

  2. 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
  1. Write the definition of a function f that takes an input x, divides it by four and then outputs that result subtracted by 5. f(x)=x/4-5
1 Like