Homework on Functions - Questions

1 A function is a mathematical calculation with consistent inputs and outputs.
2a - 4
2b - 17
2c - 0
3 - f(x)= (x/4)-5

You’re lucky that 2x2 = 2^2
Zero is a defined number!

1 Like

The parity of zero is even.
0^2=0

The parity of zero is even
0^2=0 (defined)

1 Like

The 3th answer:
0 is even so 0^2= 0

1 Like

my mistake, thanks for the correction

2 Likes

yh, typo actually :slight_smile:
thanks
@Fabrice

2 Likes
  1. Describe what a function does in your own words

A function is a computation where by different inputs yield different outputs depending on the nature of the function.

  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) = 2^2 = 4
  • b) f(7). = 7 + 10 = 17
  • c) f(0). = 0^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

Thank you Fabrice for your answer.

2 Likes
  1. A function takes inputs and modifies them in some way to produce an output.
  • 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 computation that has a certain inputs (x) that will go through a certain process to get a certain outputs.

  2. Calculate the output of the following function
    f(2) = 4
    f(7) = 17
    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

1 Like
  1. A function is a formula which for a given input gives a particular output.

  2. a) 4 b) 17 c) 0

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

1 Like
  1. A function will take an input, do a calculation or an operation with that input, and then give you an output.

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

  1. f(x) = (x/4) - 5
1 Like
  1. A function is an equation where X is a variable input, computes and gets an output
  2. A = 4, B=17, C=0
  3. f(x) = (x/4)-5
1 Like

1.) An function creates transforms an input based on defined rules

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

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

1 Like
  1. A function is an equation that performs computations with variables.

  2. 4, 17, 0

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

1 Like
  1. A “function” applies a mathematical rule to an input value in order to give an output value.

  2. a = 4 (because 2 is an even number)
    b = 17 (because 7 is an odd number)
    c = 0 (because 0 is an even number)

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

1 Like
  1. A function is a programable outcome that calculates an output once it is given an input.
  2. a) 4
    b) 17
    c) 0
  3. f(x) = (x/4)-5
1 Like

a function you enter info into the input and a result comes out the out put

But that is not how the function is programmed.

The function is deciding first whether it is even or odd before doing the required math calculation.

How do you determine zero to be even programmatically? From a programming point of view, I think zero was not taken into consideration in this function thus my answer is “no output”.