Grok Worksheet 1 Flashcards
1
Q
Give two reasons why we use comments.
A
- Communicate with other;
2. Communicate with ourselves, eg in the future when we review our code
2
Q
How can you write a really long statement that is longer than the line allows?
A
If you want a statement to continue over multiple lines you just write a backslash \ at the end of the line, and continue writing.
3
Q
What are the preferred guidelines for variable names?
A
1a. start w/ letter
1b. use double _ (__) in special cases
2. lower case
3. use _ to separate words
4. The name should be meaningful in the context of the code