Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Name: James Inglis
- # Syntax: Python
- # Date: 8/27/14
- # Description: Writing about the illegal and legal variable names
- # to use in python.
- #
- print("\t\t illegal \t\t legal")
- print("\n\t\t 23423\t\t calTax")
- print("\n\t\t _yes\t\t cal_tax")
- print("\n 23423 is illegal because it's all numbers")
- print("\n _yes is illegal because you don't start a variable name with an" +
- "underscore")
- print("\n\n calTax is legal because it's camel case and it the variable name" +
- "serves a purpose")
- print("\n cal_tax is legal because more than two word variable name can be" +
- "separated by an underscore")
- print("\n\n \t Good \t\t Bad")
- print("\n \t sum \t\t yes")
- print("\n\n Sum is a good variable name because it the name of the" +
- "total addition of two oprands")
- print("\n\n Yes is a bad variable name because what would be the purpose of" +
- "that variable")
- input("Press any key to exit!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement