The FOR loop
+22
Bermon O. Ferreras Jr
Ferre
Rfrancis03
RicManipon
Jung Kook
Lawrence
Pox
judedominguiano
iramae
Louise Sebastiane Yagi
justjoking10
ilovebts
myramonique
Emie Laide
Sean
michael jhon
airojames
ALEXIS_GAMING
Luwiezzzz
James Navarro
Rhei
daniella
26 posters
- Louise Sebastiane YagiGuru
- Posts : 19
Join date : 2018-07-27
Re: The FOR loop
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
Sent from Topic'it App
- SeanGuru
- Posts : 15
Join date : 2018-07-27
Re: The FOR loop
Wed Aug 01, 2018 5:19 am
Sa tingin ko pre Oo . Kasi same lang naman sila ng logic yung while statement at For statement .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
- myramoniqueGuru
- Posts : 11
Join date : 2018-08-01
Re: The FOR loop
Wed Aug 01, 2018 10:19 am
Ma'am ano po dapat gamitin sa loop, if o while/for?
Sent from Topic'it App
Sent from Topic'it App
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
Wed Aug 01, 2018 4:44 pm
Rhei wrote:Maam Ano po ang pinagkaiba sa paggamit ng For, If and While ?
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!
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
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!
- justjoking10Guru
- Posts : 25
Join date : 2018-08-01
Re: The FOR loop
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.
- justjoking10Guru
- Posts : 25
Join date : 2018-08-01
Re: The FOR loop
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.
- justjoking10Guru
- Posts : 25
Join date : 2018-08-01
Re: The FOR loop
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.
- myramoniqueGuru
- Posts : 11
Join date : 2018-08-01
Re: The FOR loop
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
- justjoking10Guru
- Posts : 25
Join date : 2018-08-01
Re: The FOR loop
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).
- justjoking10Guru
- Posts : 25
Join date : 2018-08-01
Re: The FOR loop
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.
- justjoking10Guru
- Posts : 25
Join date : 2018-08-01
Re: The FOR loop
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.
Re: The FOR loop
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!
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
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.
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
Thu Aug 02, 2018 7:47 am
Yes, definitely. Mas magmumukha nga lang mahirap yung flowchart nyo. Mukhang pangmatalino lolLouise Sebastiane Yagi wrote:Ma’am Daniella, is it possible that a FOR-loop can appear within a while-loop?
Sent from Topic'it App
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
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.
Re: The FOR loop
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 .
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
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.
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
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
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
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
FOR LOOP is good kapag may fixed value ka, numeral. Disadvantage hindi siya pwede by users input
Re: The FOR loop
Thu Aug 02, 2018 7:58 am
Rhei wrote:Maam Ano po ang pinagkaiba sa paggamit ng For, If and While ?
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
Re: The FOR loop
Thu Aug 02, 2018 7:59 am
yie!!!ilovebts wrote:This is truly amazing!It helped me a lot. Hope to expect more forum! Thanks for this <3
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
Thu Aug 02, 2018 8:02 am
daniella wrote:yie!!!ilovebts wrote:This is truly amazing!It helped me a lot. Hope to expect more forum! Thanks for this <3
yIEEEEEEEE KILIG KILIG
Re: The FOR loop
Thu Aug 02, 2018 8:02 am
FOR LOOP is good kapag may fixed value ka, numeral. Disadvantage hindi siya pwede by users inputilovebts wrote:Can you state the advantages and disadvantages of using a for loop? Thank you!
- ilovebtsGuru
- Posts : 10
Join date : 2018-08-01
Age : 24
Re: The FOR loop
Thu Aug 02, 2018 8:03 am
Wow! Thank you so much! I can now sleep in peace lol.daniella wrote:FOR LOOP is good kapag may fixed value ka, numeral. Disadvantage hindi siya pwede by users inputilovebts wrote:Can you state the advantages and disadvantages of using a for loop? Thank you!
Permissions in this forum:
You cannot reply to topics in this forum
|
|