Homework on Functions - Questions

  1. Describe what a function does in your own words
    A function is a mathematical calculation. The output is calculated based on the parameters set in the function.

  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
  1. A function takes an input, then performs a predefined computation to provide an output.

  2. a) 4
    b) 17
    c) 0 or null

  3. In no particular language, I think:
    F(x) = {
    x / 4 - 5
    }

1 Like
  1. A function encapsulates common functionality that applies the same processing to a set of inputs to produce an output.

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

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

1 Like
  1. A function is a fixed computational routine that has an input, a property change, and an output which reflects that change.

  • a = 4
  • b = 17
  • c = 0
  1. f(x) = (x/4)-5
1 Like

Function is a math formula coded, computations that set the rules for a problem. It has input that generats output with a function.

f (2) = 2^2 = 4
f (7) = 7+10 = 17
f (0) = 0+0 = 0 (nothing?)

f (x) = x/4-5

1 Like
  1. A function takes an imput, computes it to get an output.
  2. f(2) =4
    f(7) =17
    f(0) =0
  3. f(x)=x/4-5
    That took me an hour on a kids algebra website, I think i have got it now!!!
1 Like
  1. Function is a simply a mathematical calculation that takes an input and come out with an output.
  2. f(2)= 4. f(7)=17. f(0)=0
  3. f(x)= x/4 - 5
1 Like

1.a function are a part of the computation for ex it takes an input and gives you an output depending on the varibels whit in the function itself
2.a.4
2.b.17
2.c.10
3.f(x)/4(x)-5=(x) ???

1 Like

Homework on Functions - Questions

  1. A function is an algorithm that does a mathematical calculation with an input after which there will be an output.

  2. a.) f(2) = 2x2 = 4
    b.) f(7) = 7+10 = 17
    c.) f(0) = 0

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

1 Like

1- A function defines actions to be performed on an input and returns the result after those actions have been performed.

a) 4
b) 17
c) 0

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

1 Like
  1. A function gives an output based on an applied operation requested to the input.
  2. a) 4 b) 17 c) 0
  3. f(x)=(x/4)-5
1 Like

0 is technically ‘even’ so 0*0=0
zero is a value, while ‘null’ means the absence of a value.

check this meme :grin:

1 Like
  1. In functions you input a number to get a number output.
  2. a) 4
    b) 17
    c) 0
  3. f(x)=(x/4)-5
1 Like

Hi ziomanzo.

Thanks for the correction buddy. You are right, null IS = void. Zero still represents a number value or variable type :+1:.

2 Likes
  1. A function is an instruction that is applied to each input so that every time the input is used it will have that certain function applied and get an output which is the input plus whatever the function is.

  2. 4
    17
    0

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

1 Like
  1. Applies an operation on the input data
  2. a) 4, b) 17, c) 0
  3. f(x)=(x/4)-5
1 Like
  1. Describe what a function does in your own words : Functions are computations.
  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)
  • b) f(7)
  • c) f(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.

ANSWERS

  1. Functions are computations.
  2. a) 4
    b) 17
    c)0
  3. f(x) = (x/4)-5
1 Like
  1. Function does a calculation based on what data and instructions it is given.

  2. a = 4
    b = 14
    c = 0

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

1 Like
  1. A function is a computation where you have an input and an output. You put something into the function (input) and what you get out is the output.

f(2) = 4
f(7) = 17
f(0) = 0

  1. f(x) = (x/4) - 5
  1. A function is computation of entering an input which results in a output.

  2. a) 4
    b) 17
    c) 0

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

1 Like