Share
Go down
Guru
Posts : 19
Join date : 2018-07-27
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 12:22 am
Ma’am Daniella, is it possible that a FOR-loop can appear within a while-loop?

Sent from Topic'it App
Guru
Posts : 15
Join date : 2018-07-27
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 5:19 am
Louise Sebastiane Yagi wrote:Ma’am Daniella, is it possible that a FOR-loop can appear within a while-loop?

Sa tingin ko pre Oo . Kasi same lang naman sila ng logic yung while statement at For statement .

Sent from Topic'it App
Guru
Posts : 11
Join date : 2018-08-01
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 10:19 am
Ma'am ano po dapat gamitin sa loop, if o while/for?

Sent from Topic'it App
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 4:44 pm
Rhei wrote:Maam Ano po ang pinagkaiba sa paggamit ng For, If and While ? study Surprised

Based on my own understandings, An if statement checks if an expression is true or false, and then runs the code inside the statement only if it is true. A while statement is a loop. Basically, it continues to execute the code in the while statement for however long the expression is true. A for is a control flow statement for specifying iteration, which allows code to be executed repeatedly. Hope my answer helped you! Smile
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 4:53 pm
michael jhon wrote:mam ano po yung step value siya ba yung nagse2t kung magiincrease yung value at magde2crease?

Yes! Kaso sa pagkakaalam ko hindi dapat mag-equal sa 1. And mostly use and optional step value sa mga old programming languages such as C programming. Mas recommended na siguro ang counter ang gagamitin. Thank me later hehe! Wink
Guru
Posts : 25
Join date : 2018-08-01
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 8:43 pm
airojames wrote:Yung for loop po ba isang beses lang pwede gamitin sa isang program? Wala po kasing sample nya

Pwede sya pre gamitin multiple times sa isang program.
Guru
Posts : 25
Join date : 2018-08-01
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 8:45 pm
airojames wrote:Mam pwede po bang gawing sentinel value yung module?
Sa module ko po kasi nandoon po yung list ng mga product kumbaga data base. Kaya gagawin ko po syang sentinel value if ever wala po sya doon sa list magtatype po ulit ng panibago pwede po ba? Kung hindi ano po suggestion nyo?
Natanong lang sensya na po wala pang alam sa mga ganyan


Dipende pre. If may value k ng exit s module mo. Gets ko tanong mo pre ehh. Isip pa ko ng example.

PS. Not sure if tama.
Guru
Posts : 25
Join date : 2018-08-01
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 8:50 pm
airojames wrote:Mam kapag while loop po ba laging (<>)not equal gagamitin?


Hindi pre. Pwede any comparison pre. Dipende den kung Increment or Decrement ung ginawa mong loop.
Guru
Posts : 11
Join date : 2018-08-01
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 8:52 pm
justjoking10 wrote:
airojames wrote:Mam kapag while loop po ba laging (<>)not equal gagamitin?


Hindi pre. Pwede any comparison pre. Dipende den kung Increment or Decrement ung ginawa mong loop.

Medyo naguguluhan ako sa increment at decrement. Paano ba nangyayari yun? 😊

Sent from Topic'it App
Guru
Posts : 25
Join date : 2018-08-01
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 8:57 pm
airojames wrote:Mam kung yung while loop is may loop control variable sa for loop po meron din po ba?

Ang Control Variable mo s FOR Loop pre ay ung initial value, final value and step value mo.

Katulad nung nsa taas.
for count = 0 (initial value) to 3 (final value) step 1(step value).
Guru
Posts : 25
Join date : 2018-08-01
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 8:58 pm
Emie Laide wrote:Sa pagkakaintindi ko ang for at while parehas lng nmn ng gamit. Pero kung gusto mong mas maging maikli yung pseudo mo gamit ka ng for.

Tama. Same function ung structure lng ung pag kakaiba.
Guru
Posts : 25
Join date : 2018-08-01
View user profile

Re: The FOR loop

on Wed Aug 01, 2018 9:11 pm
myramonique wrote:
justjoking10 wrote:
airojames wrote:Mam kapag while loop po ba laging (<>)not equal gagamitin?


Hindi pre. Pwede any comparison pre. Dipende den kung Increment or Decrement ung ginawa mong loop.

Medyo naguguluhan ako sa increment at decrement. Paano ba nangyayari yun? 😊

Sent from Topic'it App

Increment(INCREASE) if ADD. Decrement(DECREASE) if minus.
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on Thu Aug 02, 2018 7:44 am
ALEXIS_GAMING wrote:Ma'am pwede pa po ba kayo magbigay ng ibang examples po? Medyo nagugulumihanan po ako ee

SURE!
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Thu Aug 02, 2018 7:45 am
airojames wrote:Yung for loop po ba isang beses lang pwede gamitin sa isang program? Wala po kasing sample nya

Pwede naman, katulad naman kasi ng for loop ang while loop interms na gumagamit ng counter.
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Thu Aug 02, 2018 7:47 am
Louise Sebastiane Yagi wrote:Ma’am Daniella, is it possible that a FOR-loop can appear within a while-loop?

Sent from Topic'it App
Yes, definitely. Mas magmumukha nga lang mahirap yung flowchart nyo. Laughing Mukhang pangmatalino lol
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Thu Aug 02, 2018 7:48 am
justjoking10 wrote:
myramonique wrote:
justjoking10 wrote:
airojames wrote:Mam kapag while loop po ba laging (<>)not equal gagamitin?


Hindi pre. Pwede any comparison pre. Dipende den kung Increment or Decrement ung ginawa mong loop.

Medyo naguguluhan ako sa increment at decrement. Paano ba nangyayari yun? 😊

Sent from Topic'it App

Increment(INCREASE) if ADD. Decrement(DECREASE) if minus.

Increment ay ginagamit para mag-raise yung value ng isang variable mo, Decrement naman ay for decrease. Smile
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on Thu Aug 02, 2018 7:49 am
justjoking10 wrote:
airojames wrote:Mam kung yung while loop is may loop control variable sa for loop po meron din po ba?

Ang Control Variable mo s FOR Loop pre ay ung initial value, final value and step value mo.

Katulad nung nsa taas.
for count = 0 (initial value) to 3 (final value) step 1(step value).

Same lang ang while and for loop , kapag ang ginamit sa while ay COUNTER dahil pareho silang may fixed value .
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Thu Aug 02, 2018 7:50 am
Louise Sebastiane Yagi wrote:Ma’am Daniella, is it possible that a FOR-loop can appear within a while-loop?

Sent from Topic'it App

Yes, possible. Pag pinagsama mo silang dalawa, nested loop na tawag dun hehe.
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Thu Aug 02, 2018 7:55 am
This is truly amazing!It helped me a lot. Hope to expect more forum! Thanks for this <3
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Thu Aug 02, 2018 7:57 am
Can you state the advantages and disadvantages of using a for loop? Thank you!

FOR LOOP is good kapag may fixed value ka, numeral. Disadvantage hindi siya pwede by users input Smile
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on Thu Aug 02, 2018 7:58 am
Rhei wrote:Maam Ano po ang pinagkaiba sa paggamit ng For, If and While ? study Surprised

magkaiba lang ang pseudocode ng 'while' and 'for' pero parehas silang may loop control variable, but ang 'while' pwede siya kahit walang fixed value, unlike sa for loop na dapat palaging fixed. best ang 'for loop' sa arrays' . Ang 'if' ay structure, hindi siya macoconsider na loop. Hindi siya okay for repetitive task, which ayun nga ang focus ng looping Wink
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on Thu Aug 02, 2018 7:59 am
ilovebts wrote:This is truly amazing!It helped me a lot. Hope to expect more forum! Thanks for this <3
yie!!! I love you
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Thu Aug 02, 2018 8:02 am
daniella wrote:
ilovebts wrote:This is truly amazing!It helped me a lot. Hope to expect more forum! Thanks for this <3
yie!!! I love you

yIEEEEEEEE KILIG KILIG Laughing
avatar
Admin
Posts : 42
Join date : 2018-07-24
Age : 20
Location : Dasmarinas City of Cavite
View user profilehttp://daniella.forumotion.asia

Re: The FOR loop

on Thu Aug 02, 2018 8:02 am
ilovebts wrote:Can you state the advantages and disadvantages of using a for loop? Thank you!

FOR LOOP is good kapag may fixed value ka, numeral. Disadvantage hindi siya pwede by users input Smile
avatar
Guru
Posts : 10
Join date : 2018-08-01
Age : 18
View user profile

Re: The FOR loop

on Thu Aug 02, 2018 8:03 am
daniella wrote:
ilovebts wrote:Can you state the advantages and disadvantages of using a for loop? Thank you!

FOR LOOP is good kapag may fixed value ka, numeral. Disadvantage hindi siya pwede by users input Smile
Wow! Thank you so much! I can now sleep in peace lol.
Sponsored content

Re: The FOR loop

Back to top
Permissions in this forum:
You cannot reply to topics in this forum