|
|
|
|
|
by Wowfunhappy
26 days ago
|
|
Fifth grade teacher here. Significant whitespace is a major reason I prefer Python for teaching programming. 1. I want kids to indent their code anyway; they may not realize it (or won't admit it), but this makes the code much easier for them to read. Kids will not do this unless they have to. 2. Unbalanced brackets are a major source of mistakes and confusion for my students. Relying purely on indentation resolves this problem—at the real cost of introducing indentation mistakes, but since I want kids to indent their code anyway, this is okay. By the way, an adjacent recommendation is to configure the editor to indent with tabs instead of spaces (regardless of how you feel about tabs vs spaces in production code). Otherwise, kids will invariably end up with lines indented by 3 or 7 or some other wacky number of spaces. If possible, highlight the tabs in a different color so the kids don't use spaces by accident. |
|
for i = 0 i < 10 i++ if i = 7 printf("hello 7") else printf("who are you");
But with a more pictorial presentation, it is easier to read the program.
for i = 0 i < 10 i++ if i = 7 printf("hello 7")
I'm just wondering - if we had a more pictograph based programming language would it be easier to understand?