Grok Worksheet 1 Flashcards

1
Q

Give two reasons why we use comments.

A
  1. Communicate with other;

2. Communicate with ourselves, eg in the future when we review our code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly