Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions STANDARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ Use these standard notations for writing pseudocodes.
```plaintext
while condition:
# code block

for i = startValue to endValue:
for i = startValue to endValue step stepValue:
# code block

for i = startValue to endValue step 2:
# For stepValue = 1
for i = startValue to endValue:
# code block
Comment on lines +55 to 57

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use for loop, no matter what! we should add stepValue.
So, we don't need second for loop.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will make the loop lengthy without any reason. We will not use step value apart from some special cases. So it is better to have a plain version, that uses single steps.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. We will have to make one standard and no matter what we should have to stick with that standard.


for item in collection:
# code block
```
Expand Down