How to handle case of variable names and commands? #768
Felienne
started this conversation in
Large Projects & Plans
Replies: 1 comment 1 reply
-
I think we should teach them to use lowercase letters, just like we do with the commands. If you can use Name, you should also be able to use Print (and maybe even pRint etc). I expect Python to discriminate upper/lower case letters as well, so then it's a nice and easy fix. On the other hand, it would be nice if not the variable name but the variable itself doesn't discriminate upper/lowercase letters for the if statements. In the summercamp I've seen some kids who were making programs like: name is ask 'What is your name?' And they'd enter 'marleen' and it wouldn't work (or the other way around). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A kid tried this:
What to do? Do we force all variables names lowercase? Do we catch and give a specific error message? It is not common but it is sensible to expect this to work as if it is the same name.
[Copied over from https://github.com//issues/169]
Beta Was this translation helpful? Give feedback.
All reactions