CS 111 Lecture Notes - Lecture 2: Decimal Mark
Document Summary
Style makes the program easier for another person to read/understand. Comments - descriptions written with the program statement that add meaning to the program in python the # indicates a comment. Programs normally have a file heading comment that describes the overall use of the file, the author, the date it was written/started, modifications made over time. Each function normally will have a function comment. Groups of statements will normally have some comments to describe particular usage of these statements. Blank lines - separate different parts of the program. Meaningful variable names - name the variables something that adds meaning to the program. Single character variables should only be used for loop counters. Indentation - critical in python helps seprate higher level sections from lower level section of code. Numbers with values after the decimal point. String - sequence of one or more characters a character is something type on a keyboard with one press.