CMPT 120 Study Guide - Exponentiation, Order Of Operations, Decimal Mark
meghan78 and 39786 others unlocked
29
CMPT 120 Full Course Notes
Verified Note
29 documents
Document Summary
Expression has a value; statement does not. String a string of letters enclosed in quotation marks. Operators special symbols that represent computations (+, -) Expression combination of values, variable and operators. Statement a unit of code that python can execute. (print & assignment) Concatenation joining strings by linking them end to end. Function name of a sequence of statements that performs a computation. Subtraction first = throat second = warbler . Function call when you call the function by name. Argument a value provided to a function. Return value the result of an argument. Int doesn"t round off; it chops off the fraction part. Example: >>> int("32") int takes any value and converts into an integer float converts integers and strings to floating-point numbers string converts its argument to a string. 3. 14159" def print_lyric(): print i"m a lumberjack, and i"m okay. print i sleep all night and i work all day.