Timeline for answer to How can I access the index value in a 'for' loop? by LunaticXXD10
Current License: CC BY-SA 4.0
Post Revisions
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 20, 2022 at 13:23 | history | edited | Peter Mortensen | CC BY-SA 4.0 |
Fixed the weird syntax highlighting (as a result, the diff looks more extensive than it really is - use view "Side-by-side Markdown" to compare).
|
| Apr 20, 2022 at 13:20 | comment | added | Peter Mortensen | Re "...must be enough aware about programming that indentation matters": Well, computers are quite literally minded. | |
| Apr 20, 2022 at 13:12 | history | edited | Peter Mortensen | CC BY-SA 4.0 |
Active reading [<https://en.wiktionary.org/wiki/whatever#Determiner> <https://english.stackexchange.com/questions/4645/is-it-ever-correct-to-have-a-space-before-a-question-or-exclamation-mark#comment206109_4645>].
|
| Jan 10, 2022 at 16:50 | history | edited | LunaticXXD10 | CC BY-SA 4.0 |
deleted 29 characters in body
|
| Jan 10, 2022 at 16:40 | history | edited | LunaticXXD10 | CC BY-SA 4.0 |
deleted 25 characters in body
|
| Jan 9, 2022 at 22:06 | comment | added | General Grievance |
@LunaticXXD10 In your original post, which you can see in the edit history, counter += 1 was indented at the same level as the for loop. In that case, it would have updated per iteration of the for loop. Here, it updates per iteration of the while loop. My question on the while loop remains: Why is it necessary to use a while loop when counter can be updated in the for loop? This is plainly visible in Rahul's answer.
|
|
| Jan 8, 2022 at 15:38 | history | edited | LunaticXXD10 | CC BY-SA 4.0 |
deleted 20 characters in body
|
| Jan 8, 2022 at 15:31 | history | edited | LunaticXXD10 | CC BY-SA 4.0 |
deleted 20 characters in body
|
| Jan 8, 2022 at 15:25 | comment | added | LunaticXXD10 | @calculuswhiz the while loop is an important code snippet. the initialiser "counter" is used for item number. About Indentation: The guy must be enough aware about programming that indentation matters. so after you do your special attribute...{copy paste} you can still edit the indentation. And the code runs very nicely and smoothly | |
| S Jan 5, 2022 at 15:36 | review | Low quality answers | |||
| Jan 8, 2022 at 15:42 | |||||
| S Jan 5, 2022 at 15:36 | review | Late answers | |||
| Jan 8, 2022 at 16:29 | |||||
| S Jan 5, 2022 at 15:19 | review | First answers | |||
| Jan 5, 2022 at 15:42 | |||||
| S Jan 5, 2022 at 15:19 | history | answered | LunaticXXD10 | CC BY-SA 4.0 |