COMPSCI C8 Lecture 2: Week 2 Study Guide (Lecture & Textbook Notes)
Document Summary
People must describe precisely what steps the computer should take in order to collect and analyze data, and those steps are expressed through programs: expressions, describe to the computer how to combine data, get evaluated , have values d, multiplication is done with an asterisk , exponentiation done with two ** (no space in between, you can do nested expressions. If you have not typed something correctly, you will get a syntax error h: names, names are given to values during assignment statements, name is followed by =, which is followed by another expression, once a name has a value assigned to it, the value will be substituted for that name in future expressions, however, only the current value of an expression is assigned to a name. Then, we divide the difference between the changed and initial amount by the initial amount: formula: ( changed / initial ) - 1 (this outputs a percent)