CSC108H1 Chapter Notes - Chapter 1: Return Statement, Memory Address
66 views2 pages
19 Nov 2016
School
Department
Course
Professor
yifanyang and 39659 others unlocked
21
CSC108H1 Full Course Notes
Verified Note
21 documents
Document Summary
Rules for executing an assignment statement: evaluate the expression on the right of the = sign to produce a value. The value has a memory address: store the memory address of the value in the variable on the left of the =. Thus the value is not connected to the expression, but to the value produced as a result of the value produced by the expression. Rules for legal python names: names must start with a letter or _, names must contain only letters, digits and _. Rules for executing a function call: evaluate the arguments, call the function, passing in the argument values. Defining functions def: a keyword indicating a function definition return: a keyword indicating the result of a function parameter: a variable that appears between the parantheses of a function definition. Parameters get their values from expressions in a function call.