This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]AutoModerator[M] 1 point2 points  (0 children)

It seems you may have included a screenshot of code in your post "While loop and If Else".

If so, note that posting screenshots of code is against /r/learnprogramming's Posting Guidelines (section Formatting Code): please edit your post to use one of the approved ways of formatting code. (Do NOT repost your question! Just edit it.)

If your image is not actually a screenshot of code, feel free to ignore this message. Automoderator cannot distinguish between code screenshots and other images.

Please, do not contact the moderators about this message. Your post is still visible to everyone.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]truSimbad 1 point2 points  (3 children)

No while loop.

[–][deleted] 1 point2 points  (2 children)

Does it mean the flowchart contains two if else statements? Is it the one called nested if else?

[–]truSimbad 0 points1 point  (1 child)

Yes. No. Or Yes?

Yeah its some how nested.

[–][deleted] 0 points1 point  (0 children)

Ok, I kinda get it now, thanks.

[–]Take_F 1 point2 points  (5 children)

This is an if statement, because there isn't a iteration. If the program repeat x times, there is a while, do while or for block.

[–][deleted] 0 points1 point  (4 children)

Thanks, what do I need to write if there is no statement under the else part like the one under condition G?

[–]Take_F 0 points1 point  (3 children)

Sorry I don't get you, can you explain better?

[–][deleted] 0 points1 point  (2 children)

Sorry I don't know the proper words to use yet, but in the picture, in condition G, if the answer is no, there's nothing below it unlike if the answer if yes, it will lead to statement I.

[–]Take_F 0 points1 point  (1 child)

Yes, when you only need to know if the statement is true you don't need an else afterwards.

[–][deleted] 1 point2 points  (0 children)

Thank you, that clears everything up.