(Sep-01-2021, 10:33 PM)Yoriz Wrote: if you use more descriptive variable names it reads a bit more like EnglishYes the sentence for each letter in "banana" print the letter sounds valid to me.
for letter in "banana": print(letter)
(Sep-12-2021, 06:01 PM)sdd Wrote: Why use the word "print" when you mean "Check if"? Print means something else in English.(This is a variation of what Yoriz said.) In the sample you provided, it is printing an expression and the expression is doing a check. The word print is misleading but I definitely do not considering it to be doing Check if; the checking is done by the expression, not the print function.
(Sep-12-2021, 06:11 PM)sdd Wrote: why not simply use the for each expression in python instead of the for-loop expression?Many other languages often use inappropriate terms. Python is improved over the C language that would say:
char banana[] = "banana";
int x;
for (x = 0; x < strlen(banana); ++x)
printf("%c\n", banana[x]);
If you want a language that is defined to be understandable to non-developers then look at COBOL; COBOL loops are described in COBOL - Loop Statements.