CSC108H1 Lecture Notes - Lecture 1: Memory Address, Triangle, Exponentiation

195 views3 pages
31 Jan 2017
School
Course
yifanyang and 39659 others unlocked
CSC108H1 Full Course Notes
21
CSC108H1 Full Course Notes
Verified Note
21 documents

Document Summary

Variable: a named location in computer memory (python keeps variables in a separate area of memory from values) Terminology: a value has a memory address, a variable contains a memory address, a variable refers/points to a value. Examples of use: value 8. 5 has memory address x34, variable shoe_size contains memory address x34, the value of shoe_size is 8. 5, shoe_size points/refers to value 8. 5. Variables example using the area of a triangle. Rules for executing an assignment statement: evaluate the expression on the right of the = sign to produce a value. This value has a memory address: store the memory address of the value in the variable on the left of the =. Rules for legal python names: names must start with a letter or , only contains letters, digits, and _ Rules for executing a function call: evaluate the arguments, call the function, passing in the argument values. Built-in functions max function: which of several numbers is the largest.

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