int i = 7;
void myFunction (int i) {
//Some code
}
Hirap iexplain.. sana maintindihan mo
Let's sayThat in itself is just a variable, because as you know it stores values, however put it in this wayCode:int i = 7;
The variable is now a parameter, since the values inside the variable may dictate how the function is run.Code:void myFunction (int i) { //Some code }
In other words, a parameter is a conditioning variable to a function. It is mostly called arguments tho in programming.
Sensya if nakakalito.. I'm not good at explaining kase eh that's just from my experience tho so don't take it as an accurate explanation.
Note that this is for programming... I don't know if this explanation applies to others (e.g statistics)
Haha sabihin mo nlang na special type of variable siya, only used in passing values inside a functionAlam ko din kasi kung paano sya ginagamit. Kasi kapag nagtatanong
Alam ko din po sya kung paano gagamitin at kaso kapag explanation na po sa ibang tao nahihirapan ako. Same po tayo ng thoughts. sana may explanation pa po na mas mababaw. Thanks
másáráp na Crispy Pata
INGREDIENTS:
- 2 kg - paa ng baboy
- 2 cups - cooking oil
- 1 cup - vinegar
- 1/2 teaspon - paminta
- 1 clove - sibuyas
- 1 clove - bawang
- 1 cup - salt
********these numbers are PARAMETERS...para sa isang másáráp ng Crispy Pata. You change any of these PARAMETERS, mag iiba ang lasa ng crispy pata.
HOW TO COOK
Pakuluan at palambutin ang paa na baboy sa kumulong tubig na may temperature na 200 degrees (temperature variable) for about 10 minutes (time variable). Sa kalagitnaan bago lumambot, hinaan mo ang apoy para ang tubig ay nasa 100 degrees lang. Pakulaan ng mga 5 more minutes (time variable).
Ilagay ang mga sangkap at pakuluaan uli with water temperature of 70 degrees (temprature variable) for about 30 minutes (time variable).
*******and that's variable(s)... it "varies"....
------ANOTHER ANALOGY-----
Cup of Coffee
Parameters:
1 cup of hot water
1/2 spoon nescafe
1 spoon sugar
Variable:
Taste = perfect coffee
If you change parameter to 2 spoons of sugar
Variable:
Taste = too sweet
Make parameter hot water to 3 cups
Taste = too plain
So parang ganito po ang pagkakaintindi ko po sa explanation nyo po. Pwedeng magbago ang result ng variable depende sa value ng parameter
String hairColor = "black";
function changeHairColor(color1, color2){
colorMix = color1 + color2;
return colorMix;
}
hairColor = changeHairColor("red", "yellow");
print "Her hair color is: " + hairColor;
May tanong ako ts, ginagamit o nagamit mo na ba sa pag proprogram mo mga yan? Kase mas madali mong ma differentiate at matutunan kung may experience ka na kung papaano gamitin mga yan.
Oo sir nagagamit ko sya sa pagpoprogram ko . May nagtanong lang kasi sa akin kung ano daw pinagkaiba ng parameter at variable hindi ko alam kung paano ko iexplain ng madali nyang maiintindihan.