Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2016-07-24 20:52:05

Zeeshan 01
Member
Registered: 2016-07-22
Posts: 746

Function

A function is a named block of code that perform some action in Programming.

Last edited by Zeeshan 01 (2018-06-22 15:06:31)


Malik

Offline

#2 2016-07-24 21:00:48

zetafunc
Moderator
Registered: 2014-05-21
Posts: 2,432
Website

Re: Function

Why would it "apply on all values"?

Offline

#3 2016-07-24 21:20:10

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Function

Why not ? It applies to all values f(2)=1-2+2^2  ; f(5)=1-5+5^2 and so on.


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#4 2016-07-26 04:49:53

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

It applies to the value in the parentheses not to any other.

f (x)=3+x

f(1)= 3 + 1 = 4


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2016-07-26 14:07:18

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

f(x) = 3x + 1

f(2) means wherever you see an x replace it with a 2.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#6 2016-07-26 14:17:36

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

x is the argument of the function called f. This is the notation we use in programming and mathematics. So, consider it a rule.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#7 2016-07-26 14:27:27

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

Yes, I can program a bit.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#8 2016-07-26 14:31:52

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

There are already many good forums for c and c++.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#9 2016-07-26 14:53:23

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

This is the first one that comes up when you google it.

http://www.cplusplus.com/forum/beginner/


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#10 2016-07-26 14:58:22

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

Not all forums are friendly so remember that.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#11 2016-07-26 15:02:48

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

This is a nice forum, you are correct.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#12 2016-07-26 15:42:27

thickhead
Member
Registered: 2016-04-16
Posts: 1,086

Re: Function

bobbym.
You have infinite patience.


{1}Vasudhaiva Kutumakam.{The whole Universe is a family.}
(2)Yatra naaryasthu poojyanthe Ramanthe tatra Devataha
{Gods rejoice at those places where ladies are respected.}

Offline

#13 2016-07-26 15:48:08

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

Not really but thanks.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#14 2016-07-26 19:16:00

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

I bike and hike, keeps me calm. If you are agitated the gators sense you and they get aggressive.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#15 2016-07-27 03:43:10

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

Hi;

I do understand and I am sorry, I make mistakes too. I was not trying to make fun of you. Everyone asks a lot of questions when they are learning. I did and still do. Ask as many questions as you like, someone will help you when I can not.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#16 2016-07-27 06:02:50

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

What are you asking help on? If your basics are weak then you will always be having problems. Imagine trying to build a house and at the very bottom, the foundation, you used weak concrete and bricks. As you build on top of it a collapse occurs because it was too weak to support the weight.

If you are having problems with arithmetic then post them first.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#17 2016-07-27 15:11:57

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Function

I see a differentiation question.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

Board footer

Powered by FluxBB