Homework on Functions - Questions

  1. Describe what a function does in your own words
    It takes input or mathematical data and produces a result or output through mathematical computations.
  2. Calculate the output of the following function
    f(x) = {

x^2 if x is even

x+10 if x is odd

}

If the input is an even number the result will be that number to the 2nd potency
If the input is an odd number the result will be that number plus a value of 10.

  1. What will be the output for the following inputs?
    • a) f(2) = 4
    • b) f(7) = 17
    • c) f(0) = 0 (if zero taken as an even number); 17 (if zero taken as an odd number)
  2. 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. Function executes set of instructions.

  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:

A function is a computation or mathematical process that takes an input data, compute it and gives an 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

f(2)=2x2=4

  • b) f(7) => 17

f(7)=7+10=17

  • c) f(0) => 0

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

A4 b 17 c 0 / f(x)=(x/4)-5

1 Like

0 is an even number. :slight_smile:

  1. A function is a mathematical statement that takes an input and gives an output based on the parameters of the given function.

  2. a) 4 b) 17 c) 0

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

1 Like

Functions are equations to give an output based on the input and function parameters given to start the process.
A.4
B.17
C. 0
3. 1. f(x) = x / [4 - 5]

1 Like
  1. Describe what a function does in your own words
    A function is a computation. These computations have inputs and outputs through a specific syntax

  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 mathematic formula that takes an input that generates an output.

a) 4
b)17
c) 0

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

1: Rules to be applied to the equation’s input.
2: a)4 b)17 c)0
3:f(x) = x/4 - 5

1 Like
  1. A function is set of instructions to perform some actions it can be computation related, logical comparison or even a simple task.

  2. Output when X is even and pass to function then it will calculate 2 to the power of that input number.

Output when x is odd and pass to function then it will increment Odd number passed as input with 10.

a) 4
b) 17
c) 10

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

1 Like

1.A. A function (general computer science) processes an input (argument or variable) and returns a computational change or output as a result of that functions equation.

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

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

1 Like
  1. A function takes an input, performs mathematical operations on it to create an output.
  2. 4, 17, 0
  3. f(x) = x/4 -5
1 Like
  1. A function is a reusable block of code that performs one or multiple tasks. It can (not required) have an input which is used to create an output.

a) 4
b) 17
c) 0

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

Homework on Functions - Questions

  1. Describe what a function does in your own words
    Function gives you an output which depends on your input. It`s a mathematical formula.

  2. Calculate the output of the following function

f(2) = 2^2 = 4
f(7) = 7+10 = 17
f(0) = 0^2 = 0 (i had to google if 0 is an even or odd number :))

  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 set of instructions where as you have an input give it some variables and you get 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) f(x) = 2x 2 = 4
  • b) f(7) f(x) = 7+10 = 17
  • c) f(0) f(x) = 0 x2 = 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 fuction is a computaion of an input that gives you and output.
  2. a)4
    b) 17
    c) 0
    3.f (x) = (x/4)-5
1 Like
  1. A function takes an input and then creates an output.

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

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

1 Like
  1. A function takes an input and uses it to solve for an output.

  2. f(x) = x^2 & f(x) = x + 10

2a. f=2, f(x) = 2^2 => 4

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

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

  1. f(x) = (x/4)-5
1 Like
  1. A function is base on your input ,will depend what your output is.
  2. a) 4
    b)17
    c) 0
  3. f(x) =x/4-5
1 Like