6 ms·
Sharing this with my AS Computer Science students. Very clear explanations.
by Hyrum_Graff 14y ago
Sharing this with my AS Computer Science students. Very clear explanations.
- d0mine 14y agoThe article requires some corrections if presented to beginners. `something` should be written as repr(something). `` (backticks) are gone in Python 3. if 0 < x > 1: is syntactically correct but it should be written as: if x > 1. The combining syntax could be used for the same direction e.g., if -1 < x < 1. Code golf is not the strong side of Python and it is not the point of FizzBuzz. Code golf might demonstrate language features but it doesn't provide the correct context for their usage i.e., code golf doesn't show to a beginner how something should be used correctly. True/False are keywords Python 3 (you can't assign to them).