COMPSCI 61A Chapter Notes - Fall 2018 Chapter 1 - Infinite loop, Docstring, Uniform Resource Locator

40 views3 pages
zogo39484755 and 6 others unlocked
COMPSCI 61A Full Course Notes
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents

Document Summary

Urlopen: function which can access the content at a uniform resource locator (url) W[::-1] enumerates each letter in a word backwards. Primitive expressions and statements (simplest building blocks) Means of combination (compound elements built from simpler ones) Means of abstraction (compound elements can be named and manipulated as units) If a value has been given a name, we say the name binds to the value. Can assign new names to functions as well (f = max) Memory that keeps track of names, values, and binding is called an environment. To evaluate a call expressions, python will: Evaluate the operator and the operand subexpressions. Pure function: applying them has no effects beyond returning a value. Must always return the same value when called twice with same arguments. Non-pure function: can generate side effects, which make some change to the state of the interpreter or computer. Ex: print returns none, but printing output is side effect of being called.

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