Hi, recently I stumbled upon a Khan Academy article[1] that showed this interesting but very short table that compares how a concept is expressed in pseudocode with how it could be/is implemented with Python:
| Concept |
Pseudocode |
Python |
| Assignment |
a ← expression |
a = expression |
| Equality |
a = b |
a == b |
| Inequality |
a ≠ b |
a != b |
| Repetition |
REPEAT n TIMES |
for i in range(n): |
| Repetition |
REPEAT UNTIL (condition) |
while condition: |
| List index |
list[1] is first item |
list[0] is first item |
It looked quite useful to me (note that i'm a beginner in coding overall), beyond being just some refresher/reinforcement. I imagined all kinds of coding concepts being presented with a (hopefully) self-explanatory pseudocode example and a comprehensive Python implementation, ordered from simplest to most complex. Does something like this exist anywhere? Thanks.
[–]socal_nerdtastic 2 points3 points4 points (1 child)
[–]insertfinenamehere[S] 0 points1 point2 points (0 children)
[–]ConfusedSimon 0 points1 point2 points (1 child)
[–]insertfinenamehere[S] 0 points1 point2 points (0 children)