unit 3 lesson Flashcards
(4 cards)
Execute one line at a time.
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.
Keywords are case sensitive
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.
Forced indentation
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.
Comments
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.