Homework on Functions - Questions

  1. A function is a computation that takes an input and gives an output based on certain defined rules

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

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

  1. Functions computation of mathematical rules

  2. a. F(2) x 2 = 4 is even
    b. F(7) +10=17 is odd
    c. F(0)=0

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

1.function is a block of code that performs a specific task and can be called multiple times throughout the program. It is essentially a reusable piece of code that takes input(s) and produces output(s) based on the input(s) and its logic.
if the input x is even, it will return the square of x, and if x is odd, it will return x+10. So, for example, if we pass the value of 4 to the function f(x), it will return the output 16, because 4 is even, and the function returns the square of x in that case. Similarly, if we pass the value of 7 to the function f(x), it will return the output 17, because 7 is odd, and the function returns x+10 in that case.

a) f(2) will return 4, because 2 is even, and the function returns the square of x in that case. So, f(2) = 2^2 = 4.

b) f(7) will return 17, because 7 is odd, and the function returns x+10 in that case. So, f(7) = 7+10 = 17.

c) f(0) will return 0, because 0 is an even number, and the function returns the square of x in that case. So, f(0) = 0^2 = 0.

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

This function first divides the input x by 4, and then subtracts 5 from the result to get the final output. For any given value of x, the output of the function f will be (x / 4) - 5.

  1. Describe what a function does in your own words
    its matematical process
  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) 2x2=4
  • b) f(7) 7+10=17
  • c) f(0) 0x2=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. A function is a mathematical way to relate a particular input to an output.

2a. f(x) = 4
2b. f(x) = 17
2c. f(x) = 0

  1. f(x) = (x/4) -5
  1. Describe what a function does in your own words
    A function computes a given input to yield an output given conditions placed on the variable being computed.

  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)
    A: 4
  • b) f(7)
    A: 17
  • c) f(0)
    A: 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

a function is a equationmathematical in which X is a variable
2- A) = 4 B) = 17 C) = 0

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

  1. A function is a basic computation. It takes an input and creates a different output.

  2. 4, 17, 0

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

1 Like

Homework on Functions - Questions

  1. Describe what a function does in your own words
    When we think in functions we think in computation, a function is an input that suffer a
    change and it became in output.
    H(x) = x+2
  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 is a computation where you give a function a number (input), this is calculated and such result is an (output).

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

  1. Describe what a function does in your own words.
    A function takes an input and performs any programmed actions on this input and then provides an output.

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. Describe what a function does in your own words: A function computes output based on input

  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. Describe what a function does in your own words.
    A function takes an input does a calculation and gives an output.
  2. Calculate the output of the following function:
    a) 4 b) 17 c) 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

Homework on Functions - Questions

  1. Describe what a function does in your own words
    Function is computations, witch gives output depending on input.
  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. Describe what a function does in your own words
    -> It’s the relationship between an input or a set of inputs to get a singular output.

  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)

-> a) f(2)^2 = 4
-> b) f(7 + 10) = 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.

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

  1. A function takes an input, does something, and creates an output.
  2. a) 4 b)17 c)0
  3. f(x) = (x/4)-5
  1. A Function allows a Parm input; the result of which is the calculation of said funtion.

2a=4
2b=17
2c=0

  1. f(x) = { (x/4) - 5}
1 Like
  1. A function is computer code written to accept inputs and give a programmed output.
  2. The results for function are:
    a) 4
    b) 17
    c) 0
  3. f(x)  =  {  (x/4) - 5 }
  1. 4
  2. 17
  3. 0

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

1 Like
  1. a function is a computation that changes a value (imput) to another value (output)

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

1 Like