0

why this-is-name=7 is not correct and THIS_IS_NAME=7 is correct😲

29th Sep 2016, 1:41 PM
amir mahir
amir mahir - avatar
8 Antworten
+ 3
- is not a valid letter for naming because python uses it as a operator. IE 3-1 _ is valid for breaking up words in a name
30th Sep 2016, 2:00 AM
Shannon Green
Shannon Green - avatar
0
go review the first module. it has a section on variables that goes over this.
29th Sep 2016, 3:18 PM
Luke Armstrong
0
still dont get it , arent they thé same?
29th Sep 2016, 6:12 PM
amir mahir
amir mahir - avatar
0
there are rules for naming variables. such as not starting a variable with a number, not containing spaces, and no symbols other than an underscore
29th Sep 2016, 6:25 PM
Luke Armstrong
0
because - is an invalid identifiers
4th Oct 2016, 12:06 PM
Prateek Surana
Prateek Surana - avatar
0
u only can use underscores for separating words
11th Oct 2016, 9:41 AM
MO Na3ri
MO Na3ri - avatar
0
No such variables as- CAN be added in the pythons set of rules
29th Oct 2016, 6:22 AM
miron