CSC108H1 Lecture Notes - Lecture 1: Memory Address, Exponentiation, Eval
yifanyang and 39659 others unlocked
21
CSC108H1 Full Course Notes
Verified Note
21 documents
Document Summary
#comment (use for explanation) i. e. exponents (x**y) give z. but division (x/y) gives z . 0. F l o a t: floating point number (i. e 2. 0) 0. 666666666666 but python has a memory limit and cannot give all the repeating digits, hence called floating point division with some imprecision (i. e. 7/3=2. 33333 5)) I n t e g e r d i v i s i o n: evaluation gives an end as opposed to a float (i. e. 4//2= 2 and 2//3 =0 ) M o d : to get . Computer has a memory storing long lists of data locations, which are labelled with a number (i. e. x201) called . Negation; add a - (subtraction sign) in front of number. Computers keep track of all the associated values of each memory address. do this using variables. I. e. find area of a triangle (base * height) A contains memory address x1 and b contains memory address x5.