Thanks for explanation. I still need read it several times to understand it.
-
Function is a formula where you use a variable to calculate the output.
-
a. 4
b. 17
c. 0 -
f(x)=(x/4)-5
Hello
-
a function applies a predetermined process to a variable.
a) 4
b)17
c) N/A
d) f(x) = ( x/4 - 5)
Best
-
A function is a mathematical computation that derives an output, based on the input and function.
-
f(x) = {x^2 if x is even x+10 if x is odd}
a) 4
b) 17
c) 0 -
f(x) = (x/4)-5
-
A function calculates an output based on the definition of the function and the input.
-
a) 4; b) 17; c) 0 (zero is an even number because it is divisible by 2 without a remainder)
-
f(x) = x/4 - 5
- A function takes and input and produces and output.
- a) 4, b) 17, c) 0
- f(x)=(x/4)-5
- Describe what a function does in your own words. A function is an expression that takes an input and produces a derived output.
- 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
- 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 is a mathematical expression which allows an input to be computed using variables into 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
-
A function is a computation. It takes an input to compute an output.
a) 4
b) 17
c) 0
- f(x) = (x/4) - 5
1. Describe what a function does in your own words
A function combines several instructions into a single line of code
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}
- Describe what a function does in your own words – A function takes an input value, does a calculation with the input value, and emits an output value.
- 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?
* f(2) = 2^2 = 4
* f(7) = 7 + 10 = 17
* f(0) = 0^2 = 0
- 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- It’s a computation that applies a one or multiple oerations to an input to give an output.
2- a)4, b) 17, c)0.
3- f(x)=x/4-5
- A function is a computation that you define.
- 4
17
error - f(x)=(x/4) - 5
Homework on Functions - Questions
- Describe what a function does in your own words
- its a set of rules which produces different output by changing the variable.
- 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
- Write the definition of a function f that takes an input x, divides it by four and then outputs that result subtracted by 5.
[/quote]
f(x) = x /4 - 5
-
A function is calculating a value (output) that is dependent on one or more variables (input). A function always follows a pre set formula.
a) f(2) (x is even) means the formula is f(x) = x^2 and that gives us f(2) = 2^2 = 4 Answer: 4
b) f(7) (x is odd) means the formula is f(x) = x +10 and that gives us f(7) = 7 +10 = 17 Answer: 17
c) f(0) (x is even) means the formula is f(x) = x^2 and that gives us f(0) = 0^2 = 0 Answer: 0
- f(x) = (x/4) - 5
technically, zero is even. 0^2 = 0
1-Function is a mathematical equation that takes and input and produces and output. The out put changes with variable inputs.
2a-f(2)= 2 X 2 =4
2b-f(7) since odd add 10 f(7)=7 + 10 = 17
2c-f(0) =0
3- f(x)=[x/4] - 5
A function creates an output by applying a variable to a given input.
- a) f(2) = 4
- b) f(7) = 17
- c) f(0) = 0
- f(x) = (x/4)-5
#Written in Python since that is
#the programming language that I am most familiar with.
def f(x):
if (x % 2 == 0): # if x divided by 2 leaves no remainder...(x is even)
return(x**2) # return x to the power of 2
else:
return x+10 # otherwise (x is odd) return x + 10
# What will be the outputs of the following inputs?
print(f(2)) # 14
print(f(7)) # 17
print(f(0)) # 0
#3. Write a function that takes an input x, divides it by four then outputs that result subtracted by 5
def f(x):
return ((x/4.0)-5.0)
print(f(100))
Homework
1.In my understanding function is a math formula. And u are able to change variable in a function, not in a formula. Output depends on a formula(captain obvious) and the variable(input).
2.f(x) = {x^2 if x is even x+10 if x is odd}
f(2)=4
f(7)+17
f(0)=0
- f(x)=(x/4)-5
it toked me like 20 min to remember what a function is and how to use it. thanks for school…