CMPT 120 Lecture Notes - Lecture 8: Concatenation, String Operations, Order Of Operations

25 views5 pages
meghan78 and 39786 others unlocked
CMPT 120 Full Course Notes
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.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents