Homework on Functions - Questions

Homework on Functions - Questions

  1. Describe what a function does in your own words
  • A function is a computation. It computes your input and gives you an proper mathematical output.
  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(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

Thank you I will correct it , I am coming back to Math after many many years :smile:

2 Likes
  1. A function is a subroutine that recieves information as an input, applies a process to that input and returns an out put based on the results.

  2. a) f(2)=4
    b) f(7)=17
    c) f(0)=0 (honestly it depends on how the language you are programming in handles 0, another likely outcome is an error)

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

  1. Describe what a function does in your own words.
    A function is a computation that has an input and an output.

  2. Calculate the output of the following function.
    a. f(2)
    f(2) = 2 x 2 = 4

b. f(7)
f(7) = 7 + 10 = 17

c. f(0) = 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.
Answer: f(x)=/4-5

1 - A function is a piece of code or a set of instructions that receives an input, does something with it and gets an output.

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

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

1 Like

You’re lucky that 2+2 = 2^2
Check this post for the meaning of ^

2 Likes

Yes, in written language we use it like this. In computer science, we use that symbol ^ for power relations.

2 Likes

0^2 will never have errors. (defined) It’s perfectly fine. However, dividing by zero is another issue.

1 Like

You forgot an ‘x’, you can’t start with a division without a numerator.

f(x) = x/4 - 5

1 Like

1- A function is a variable “instruction” that is applied to the input.

2- a) 4
b) 17
c) 0

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

1 Like
  1. A function takes an input, which can be anything, and turns it into an output by running it through an equation.
    2a. 4
    2b. 17
    2c. 0
  2. f(x)= (x/4)-5
1 Like

1.)A function is a math equation , by having a variable with an input that computes an output. In this case “X” being the variable.

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

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

1 Like
  1. A function f(x) is a mathematical concept. We talk about it when we have an input and output.
    2 f(x)=4
    f(x)=odd
    f(1)=11

@marsrvr - you must dream in infographics. (☞゚ヮ゚)☞

1 Like
  1. Describe what a function does in your own words- A function is an equation that computes an input into an output.
  2. Calculate the output of the following function-
    a) 4
    b) 17
    c) 0
  3. Write the definition of a function f that takes an input x, divides it by four and the outputs that result subtracted by five.- f(x)=(x/4)-5
1 Like

Function calculates input variables to outputs

a)4
b)17
c)0

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

1 Like
  1. a function is an equation that has an input and gives you an output
  2. a) f(2) = 4
    b) f(7) = 17
    c) f(0) = 0
  1. f(x) = (x/4) - 5
1 Like
  1. A function is a mathematical equation that has an input and an output.
  2. a) 4 . b) 17 . c) 0
  3. f (x/4)-5

1. Describe what a function does in your own words
A function takes an input, does a calculation with/on it and returns an output.

2. Calculate the output of the following function […] What will be the outputs?
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.
f(x) = x / 4 - 5

1. Describe what a function does in your own words

A function carries out a process on a given input to give 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) =4
  • b) f(7) =17
  • c) f(0) =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.

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