CSC108H1 Lecture Notes - Lecture 3: Computer Memory, Short Circuit, Precondition

99 views2 pages
10 Apr 2016
School
Course
yifanyang and 39659 others unlocked
CSC108H1 Full Course Notes
21
CSC108H1 Full Course Notes
Verified Note
21 documents

Document Summary

Capital letters are less than lowercase letters: but b>a. Values of different types can be compared for equality, but cannot usually be compared for ordering (e. g. int and float can be compared to each other len (str): return the number of characters in str. And: true only if a and b are both true. Or (lowest precedence: true if either a or b are true. Short circuit evaluation as soon as you know the answer, give it. Computer memory stores binary values (0"s or 1"s) False is represented by 0, true is represented by 1. Precondition: the conditions under which a statement is intended to work. Elif expressions: 0 or more elif clause. Else expressions: 0 or 1 else clause; must be last. For positive numbers: e. g. s[3: start counting 0 the left. For negative numbers: e. g. s[-12: start counting -1 from the right (last digit)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents