unit 3 lesson Flashcards

1
Q

Execute one line at a time.

A

A program will only execute one statement at a time, and running statements together hurts readability. For this reason, statements are most commonly written on separate lines, but they can also be on the same line separated by a semicolon.

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

Keywords are case sensitive

A

Keywords are reserved words that have a predefined meaning in a programming language. Most widely used programming languages are case sensitive. In Python, the keywords False, True, and None are capitalized.

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

Forced indentation

A

Python has a forced indentation rule. To indicate a block of code in Python, you must indent each line of the block by the same amount. Four spaces is the typical indent amount; however, any indent will work for this purpose. The easiest way to indent is to use the Tab button on your keyboard.

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

Comments

A

Comments are used to clarify code and are not interpreted by the interpreter as functions. Instead, comments are marked by symbols, so the interpreter recognizes them. Every programming language has commenting symbols, and these symbols are different depending on the programming language.

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