Homework on Functions - Questions

1. Describe what a function does in your own words

  • A function is an equation where a number is replaced with a variable. This variable varies depending on which one you replace it with. Therefore resulting in an 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. 4
  • b. 17
  • c. 0

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.

    1. f(x) = { (x / 4) - 5 }
1 Like
  1. A function is a computation that takes an input and creates an output.

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

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

1 Like
  1. Function is the capability of having variables in a equation and produce programmable results

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

** 1. Describe what a function does in your own words**
a Function is a mathematical relationship where the value of results (output) depends of the value(s) of the entries (inputs)
2. Calculate the output of the following function:

  • a) f(2) = 4
2 is even, then 
x= 2; f(2) = 2^2; 
then;
 f(2) = 4
  • b) f(7) = 17
7 is odd  then;
x= 7 ; f(7) = 7+ 10 ;  
f(7) = 17;
  • c) f(0) = 0
0 is even so;
x= 0; f(0) = 0^2; 
then;
 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 is a mathematical relation between two quantities in which one quantity depends on another. We can use this relationship to make predictions and because each input value results in exactly one output value, the output is a function of the input.

  1. Calculate the output of the following function
    f(x) = {

x^2 if x is even

x+10 if x is odd

}

Solution: f(x) = {
If x is even, output of f(x) = x^2 and (f-x) = -x^2 =x^2. Output = x^2
If x is odd, output of f(x) = x + 10 is and output of f(-x) = 10-x

What will be the output for the following inputs?
• a) f(2)
Output for f(2) = f(2^2) = 4. Outputs for f(x) = x+10 are 2 +10 and 10-2 or 12 and 8.

• b) f (7)
Output for f(7) = f(7^2) = 49. Outputs for f(x) = x +10 = 7 + 10 =17 and f(x) = 10-x = 10 -7 = 3. Outputs are 49, 17, 3.

• c) f (0)

Output for f (0) = f(0^2) =0. Outputs for f(x) = x + 10 = 10 and f(x) = 10-0 = 10.

  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 math formula. It describes the formula for the x input
  2. a) 4 b) 17 c) 0
  3. f(x)=(x/4)-5
1 Like
  1. A function is used to assign value.

  2. f(x) = x^2
    f(2) = 2^2
    4

    f(x) = x+10
    f(2) = 2+10
    12

    f(x) = x^2
    f(7) = 7^2
    49

    f(x) = x+10
    f(7) = 7+10
    17

    f(x) = x^2
    f(0) = 0^2
    0

    f(x) = x+10
    f(0) = 0+10
    10

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

1 Like
  1. A function turns one number(input) into another number(output). The main thing to point out here is that even if the inputs vary the output will always depend on the function we used.

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

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

1 Like

f(x) = {

x^2 if x is even

x+10 if x is odd

}
Is a branching function. Simply meaning you decide the path the function will take based on the function input. So in case where x = 7, it means that x is an odd number and therefore you use the second path (x + 10). And in case x= 2, since 2 is even number, you use the first path. f(2) = 2^2 = 4.

  1. A function takes and input and calculates a output or result.
  2. a=4 (assuming ^ means multiply) b=17 c=0
  3. f(x)= { (x/4) - 5 }
1 Like

Thank you for that clarification!

1.A function is an equation that produces an mathematical output or result based on the input

  1. 4, 17, 0

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

1 Like
  1. Describe what a function does in your own words

A// what a function does is with the input we give it calculate taking into account some factors what would be the output, so give the function a number and receive a complete diferent number because of how is the function compose.

  1. 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(4)
  • b) f(17)
  • 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.

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

1 Like
  1. Function consists of input and output. Input value will impact result of output.
  2. a) 4; 12 b) 14;17 c) 0; 10
  3. f(x)=x/4-5
1 Like
  1. A function is a equation where there is a variable present.

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

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

1 Like
  1. takes an input and gives an output

  2. 4
    17
    0

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

1 Like
f(x) = {

x^2 if x is even

x+10 if x is odd

}
Is a branching function. Simply meaning you decide the path the function will take based on the function input. So in case where x = 7, it means that x is an odd number and therefore you use the second path (x + 10). And in case x= 2, since 2 is even number, you use the first path. f(2) = 2^2 = 4.
3 Likes
  1. runs a block of code when called

  2. a) 4
    b) 17
    c) 0

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

1 Like

1 it is a math problem or little program that the over whole program runs to apply a result from an input

2 a: 4
b: 17
c: 0

3
f(x) = {

x/4-5

}

1 Like

1.) the function represents a computation that uses an input, then calculates (computes) into an output.

a.) 4
b.) 17
c) 0