CMPT 120 Lecture Notes - Lecture 8: Concatenation, String Operations, Order Of Operations
![CMPT 120 Full Course Notes](https://new-docs-thumbs.oneclass.com/doc_thumbnails/list_view/2242525-class-notes-ca-sfu-cmpt-120-lecture27.jpg)
29
CMPT 120 Full Course Notes
Verified Note
29 documents
Document Summary
Lecture 8 part 4: logical operators, variables, statements. Logical operator: not its and truth table not: it reverses the logical value of the boolean expression. It turns a true into false, and a false into a true. It is recommended to place parentheses around a boolean expression to clarify to what you are applying the not operator. Variable is a name that represents a value stored in the computer memory (ram). We store data in computer memory via variable names. We access and manipulate data in in memory via variables. Assignment statement assigns a value to a variable. (variable that receive value should be on left. ) You can only use a variable if a value is assigned to it. Variable name cannot be a python key word, like input, print, if. Total marks in invalid, but totalmarks is valid. First character must be a letter or an underscore. 7stars is invalid, but _7stars is valid.