Calling a fuction its exactly what it sounds like. You are telling the fuction to act on the values you have stablished. to call a fuction first you must have a variable that will get the return value of your fuction.<\/p>\n
example:<\/p>\n
lets say you crated a fuction called:<\/b> make_sum.<\/p>\n
the fuction would look like this:<\/b><\/p>\n return<\/span> ans<\/span><\/span> return<\/span> ans<\/span><\/span> return<\/span> ans<\/span><\/span><\/p>\n and the variable the_sum will receve the return value of:<\/b><\/span> return<\/span> ans<\/span><\/span> The Fun with numbers code in here<\/a> shows an example of a program that calls differnt fuctions.<\/span> Calling a fuction its exactly what it sounds like. You are telling the fuction to act on the values you have stablished. to call a fuction first you must have a variable that will get the return value of your fuction.example:lets say you cr… Continue reading
<\/span><\/span>so in your code you would create a varible, lets say:<\/b><\/span><\/span>
<\/span><\/span>the_sum =<\/span><\/span>
<\/span><\/span>then you write the fuction, adding the values that you want it to take.<\/b><\/span><\/span>
<\/span><\/span>the_sum = make_sum(2<\/span>,5<\/span>)<\/span><\/span>
<\/span><\/span>so: <\/b><\/span><\/span>
make_sum<\/span><\/span>(x,y):<\/span><\/p>\n
will become:<\/b><\/p>\n
<\/span><\/p>\n
wich in this case is 7<\/span>.<\/b><\/span><\/span><\/p>\n
<\/span>note: is very usefull to create your fuctions in a separate place from the rest of the code.<\/span>
<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"