Edited, memorised or added to reading queue

on 01-Jan-2017 (Sun)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Flashcard 1427511577868

Tags
#derecho #introduccion-al-derecho
Question
La aplicación de las normas jurídicas debe tener un [...] para la aplicación en el campo legal
Answer
ordenamiento jurídico

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
La aplicación de las normas jurídicas debe tener un ordenamiento jurídico para la aplicación en el campo legal

Original toplevel document

1.3.5 Orden jurídico de las normas
La aplicación de las normas jurídicas debe tener un ordenamiento jurídico para la aplicación en el campo legal, ya que el que debe de aplicar su cumplimiento es el Estado a través de leyes ordenadoras y sancionadoras. 1.3.5.1 Pirámide de las normas de Hans Kelsen Hans







Flashcard 1427634261260

Tags
#cfa-level #economics #microeconomics #reading-13-demand-and-supply-analysis-introduction #study-session-4
Question
Overall, the study session 4 provides the economic tools for understanding how [...] markets function and [...] of different industries.
Answer
product and resource

and the competitive characteristics

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill






Flashcard 1432321658124

Tags
#cfa #cfa-level-1 #economics #microeconomics #reading-14-demand-and-supply-analysis-consumer-demand #section-4-the-opportunity-set #study-session-4
Question

Let Warren’s income be given by I, the price he must pay for a slice of bread be PB, and the price he must pay for an ounce of wine be PW. Warren has freedom to spend his income any way he chooses, so long as the expenditure on bread plus the expenditure on wine does not exceed his income per time period. We can represent this [...] ) with the following expression:

Equation (3) 

PBQB + PWQWI


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
the price he must pay for an ounce of wine be P W . Warren has freedom to spend his income any way he chooses, so long as the expenditure on bread plus the expenditure on wine does not exceed his income per time period. We can represent this <span>income constraint (or budget constraint ) with the following expression: Equation (3)  P B Q B + P W Q W ≤ I<span><body><html>

Original toplevel document

4. THE OPPORTUNITY SET: CONSUMPTION, PRODUCTION, AND INVESTMENT CHOICE
nd wine and were allowed to exchange at some pre-determined ratio. Although that circumstance is possible, a more realistic situation would be if Warren or Smith had a given income with which to purchase bread and wine at fixed market prices. <span>Let Warren’s income be given by I, the price he must pay for a slice of bread be P B , and the price he must pay for an ounce of wine be P W . Warren has freedom to spend his income any way he chooses, so long as the expenditure on bread plus the expenditure on wine does not exceed his income per time period. We can represent this income constraint (or budget constraint ) with the following expression: Equation (3)  P B Q B + P W Q W ≤ I This expression simply constrains Warren to spend, in total, no more than his income. At this stage of our analysis, we are assuming a one-period model. In effect, then, Wa







Flashcard 1432418651404

Tags
#italian #italian-grammar
Question
Even where living beings are concerned, [...] is not always the same as natural gender
Answer
grammatical gender

una tigre (either sex unless specified); un ippopotamo

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
All nouns in Italian have a gender: they are either masculine or feminine, even if they are inanimate objects. Even where living beings are concerned, grammatical gender is not always the same as natural gender: una tigre ‘a tiger’ (either sex unless specified); un ippopotamo ‘a hippopotamus’. Gender is important since it determines the form of noun, th

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 1432706223372

Tags
#italian #italian-grammar #structure
Question
Italian dictionaries usually indicate the gender of nouns with abbreviations such as [...] and s.f. [...]
Answer
s.m. (sostantivo maschile)

(sostantivo femminile).

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
Italian dictionaries usually indicate the gender of nouns with abbreviations such as s.m. (sostantivo maschile) and s.f. (sostantivo femminile).

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 1433120935180

Tags
#italian #italian-grammar
Question
Masculine nouns ending in -co or -go in the singular normally form the plural as -chi and -ghi, if [...]:
Answer
the stress falls on the penultimate syllable (graves)

fuoco fuochi fire

ago aghi needle

buco buchi hole

albèrgo albèrghi hotel

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
Masculine nouns ending in -co or -go in the singular normally form the plural as -chi and -ghi, with the hard c, g sound, if the stress falls on the penulti- mate syllable: fuoco fuochi fire ago aghi needle buco buchi hole albèrgo albèrghi hotel

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 1433135877388

Tags
#italian #italian-grammar #noun-patterns
Question
Feminine nouns ending in -cia, -gia form their plural as follows:

• in [...] when the stress falls on the i , and when the last syllable is preceded by a vowel:
Answer
-cie, -gie

farmacìa farmacìe pharmacy

bugìa bugìe lie

camìcia camìcie shirt

ciliègia ciliègie cherry

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
Feminine nouns ending in -cia, -gia form their plural as follows: • in -cie, -gie when the stress falls on the i , and when the last syllable is preceded by a vowel: farmacìa farmacìe pharmacy bugìa

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 1434975341836

Tags
#italian #italian-grammar
Question
The verb mood we use most in speaking and writing is the [...].
Answer
indicative mood

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
The verb mood we use most in speaking and writing is the indicative mood. Within this mood is a full range of tenses: present mangio ‘I eat’; past ho mangiato ‘I have eaten’; future mangerò ‘I will eat’; etc. The verb mood used to express uncertainty is the

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 1434984779020

Tags
#italian #italian-grammar
Question
An indirect object can be found with a [...], which already has one direct object:
Answer
transitive verb

ho mandato delle cartoline ai miei amici ‘I sent some postcards to my friends’.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
An indirect object, whether noun or pronoun, is one that is indirectly affected by the action or event. An indirect object can be found with a transitive verb, which already has one direct object: ho mandato delle cartoline ai miei amici ‘I sent some postcards to my friends’. Or it can be used with an intransitive verb, which does not take a

Original toplevel document (pdf)

cannot see any pdfs







Flashcard 1435572505868

Tags
#cfa #cfa-level-1 #economics #lol #microeconomics #reading-15-demand-and-supply-analysis-the-firm #section-2-objectives-of-the-firm #study-session-4
Question
The characteristics of the [...] market and of the [...] market, play an important role in the determination of profit.
Answer
product

resource

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
The characteristics of the product market, where the firm sells its output or services, and of the resource market, where the firm purchases resources, play an important role in the determination of profit.

Original toplevel document

2. OBJECTIVES OF THE FIRM
  Π = TR – TC where Π is profit, TR is total revenue, and TC is total costs. TC can be defined as accounting costs or economic costs, depending on the objectives and requirements of the analyst for evaluating profit. <span>The characteristics of the product market, where the firm sells its output or services, and of the resource market, where the firm purchases resources, play an important role in the determination of profit. Key variables that determine TC are the level of output, the firm’s efficiency in producing that level of output when utilizing inputs, and resource prices as established by resource ma







Flashcard 1435756793100

Tags
#2-1-3-economic-rent #2-1-types-of-profit-measures #cfa-level-1 #economics #microeconomics #reading-15-demand-and-supply-analysis-the-firm #section-2-objectives-of-the-firm #study-session-4
Question
Because of their limited availability in nature, certain resources—such as [...]—possess highly inelastic supply curves in both the short run and long run
Answer
land and specialty commodities

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
Because of their limited availability in nature, certain resources—such as land and specialty commodities—possess highly inelastic supply curves in both the short run and long run (shown in Exhibit 1 as a vertical supply curve).

Original toplevel document

2. OBJECTIVES OF THE FIRM
er competing firms to compete away any economic profit over the long run. Economic profit that exists over the long run is usually found where competitive conditions persistently are less than perfect in the market. <span>2.1.3. Economic Rent The surplus value known as economic rent results when a particular resource or good is fixed in supply (with a vertical supply curve) and market price is higher than what is required to bring the resource or good onto the market and sustain its use. Essentially, demand determines the price level and the magnitude of economic rent that is forthcoming from the market. Exhibit 1 illustrates this concept, where P 1 is the price level that yields a normal profit return to the business that supplies the item. When demand increases from Demand 1 to Demand 2 , price rises to P 2 , where at this higher price level economic rent is created. The amount of this economic rent is calculated as (P 2 – P 1 ) × Q 1 . The firm has not done anything internally to merit this special reward: It benefits from an increase in demand in conjunction with a supply curve that does not fully adjust with an increase in quantity when price rises. Exhibit 1. Economic Rent Because of their limited availability in nature, certain resources—such as land and specialty commodities—possess highly inelastic supply curves in both the short run and long run (shown in Exhibit 1 as a vertical supply curve). When supply is relatively inelastic, a high degree of market demand can result in pricing that creates economic rent. This economic rent results from the fact that when price increases, the quantity supplied does not change or, at the most, increases only slightly. This is because of the fixation of supply by nature or by such artificial constraints as government policy. How is the concept of economic rent useful in financial analysis? Commodities or resources that command economic rent have the potential to reward equity investors more than what is required to attract their capital to that activity, resulting in greater shareholders’ wealth. Evidence of economic rent attracts additional capital funds to the economic endeavor. This new investment capital increases shareholders’ value as investors bid up share prices of existing firms. Any commodity, resource, or good that is fixed or nearly fixed in supply has the potential to yield economic rent. From an analytical perspective, one can obtain industry supply data to calculate the elasticity of supply , which measures the sensitivity of quantity supplied to a change in price. If quantity supplied is relatively unresponsive ( inelastic ) to price changes, then a potential condition exists in the market for economic rent. A reliable forecast of changes in demand can indicate the degree of any economic rent that is forthcoming from the market in the future. When one is analyzing fixed or nearly fixed supply markets (e.g., gold), a fundamental comprehension of demand determinants is necessary to make rational financial decisions based on potential economic rent. EXAMPLE 1 Economic Rent and Investment Decision Making The following market data show the global demand, global supply, and price on an annual basis for gold over the period 2006–2008. Based on the data, what observation can be made about market demand, supply, and economic rent? Year 2006 2007 2008 Percent Change 2006–2008 Supply (in metric tons) 3,569 3,475 3,508 –1.7 Demand (in metric tons) 3,423 3,552 3,805 +11.2 Average spot price (in US$) 603.92 695.39 871.65 +44.3 Source: GFMS and World Gold Council. Solution: The amount of total gold supplied to the world market over this period has actually declined slightly by 1.7 percent during a period when there was a double-digit increase of 11.2 percent in demand. As a consequence, the spot price has dramatically increased by 44.3 percent. Economic rent has resulted from this market relationship of a relatively fixed supply of gold and a rising demand for it. 2.2. Comparison of Profit Measures All three types of profit are interconnected because, according to Equation 4, acco







Flashcard 1435910147340

Tags
#eximbank #export-dot-gov #octopus #usa
Question
The guarantees for [...] to [...] are of specific interest to U.S. exporters.
Answer
medium-term loans

foreign buyers of capital equipment

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Parent (intermediate) annotation

Open it
span>The Export-Import Bank of the United States (Ex-Im Bank), an independent agency of the federal government, offers various short-, medium- and long-term export finance and insurance programs. Of specific interest to U.S. exporters are the <span>guarantees for medium-term loans to foreign buyers of capital equipment. Most loans are made by U.S. banks with Ex-Im Bank’s guarantee. More than 85 percent of Ex-Im’s transactions in recent years directly benefited small businesses.<span><body></h

Original toplevel document

Mexico - Project Financing
ums often develop a finance mix between development banks, multilaterals, commercial banks, and national export credit agencies, such as the U.S. Export-Import Bank. U.S. Export-Import Bank (http://www.exim.gov) <span>The Export-Import Bank of the United States (Ex-Im Bank), an independent agency of the federal government, offers various short-, medium- and long-term export finance and insurance programs. Of specific interest to U.S. exporters are the guarantees for medium-term loans to foreign buyers of capital equipment. Most loans are made by U.S. banks with Ex-Im Bank’s guarantee. More than 85 percent of Ex-Im’s transactions in recent years directly benefited small businesses. Much of Ex-Im Bank’s activity is under so-called bundling facilities. A bundling facility is a large medium-term loan made to a Mexican bank by a U.S. bank with the guarante







Flashcard 1436338228492

Tags
#charisma #myth
Question
What is the three step procedure for overcoming internal discomfort?
Answer
1. Destigmatize discomfor
2. Neutralize negative thoughts
3. Rewrite Reality

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill






Flashcard 1436340063500

Tags
#charisma #myth
Question
How do you destrigmatize/dedramatize discomfort? (3 techniques)
Answer
  • By remembering that they are survival instincts and a natural part of the human experience.
  • ​By thinking of others who’ve gone through this before—especially people you admire—and seeing yourself as part of a community of human beings experiencing the same feeling at the same moment
  • Imagining zooming out from space to earth

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill






Flashcard 1436341898508

Tags
#charisma #myth
Question
How do you neutralize negative emotions?
Answer
Neutralize unhelpful negative thoughts by remembering that the mind often distorts reality and filters your environment to highlight the negative. Think of your negative thoughts as graffiti on a wall—you may find it an ugly sight, but just because you see an ugly sight doesn’t mean you’re an ugly person.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill






Flashcard 1436343733516

Tags
#charisma #myth
Question
How do you 'rewrite reality'?
Answer
By imagining or writing down the alternate scenario (e.g apology letter)​​ in vivid detail


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill






Flashcard 1436345568524

Tags
#charisma #myth
Question
How do you become comfortable with discomfort?
Answer
Passively focus on the sensations of discomfort, imagine it as a third-party observing it from afar

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill






#python #scip

Every powerful language has three such mechanisms:

  • primitive expressions and statements, which represent the simplest building blocks that the language provides,
  • means of combination, by which compound elements are built from simpler ones, and
  • means of abstraction, by which compound elements can be named and manipulated as units.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
ust be written for people to read, and only incidentally for machines to execute. When we describe a language, we should pay particular attention to the means that the language provides for combining simple ideas to form more complex ideas. <span>Every powerful language has three such mechanisms: primitive expressions and statements , which represent the simplest building blocks that the language provides, means of combination , by which compound elements are built from simpler ones, and means of abstraction , by which compound elements can be named and manipulated as units. In programming, we deal with two kinds of elements: functions and data. (Soon we will discover that they are really not so distinct.) Informally, data is stuff that we want to manipul




#python #scip
data is stuff that we want to manipulate, and functions describe the rules for manipulating the data
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
d means of abstraction , by which compound elements can be named and manipulated as units. In programming, we deal with two kinds of elements: functions and data. (Soon we will discover that they are really not so distinct.) Informally, <span>data is stuff that we want to manipulate, and functions describe the rules for manipulating the data. Thus, any powerful programming language should be able to describe primitive data and primitive functions, as well as have some methods for combining and abstracting both functions and




#python #scip
One kind of primitive expression is a number. More precisely, the expression that you type consists of the numerals that represent the number in base 10
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
terpreter in the previous section, we now start anew, methodically developing the Python language element by element. Be patient if the examples seem simplistic — more exciting material is soon to come. We begin with primitive expressions. <span>One kind of primitive expression is a number. More precisely, the expression that you type consists of the numerals that represent the number in base 10. >>> 42 42 Expressions representing numbers may be combined with mathematical operators to form a compound expression, which the interpreter will evaluate: >>>




#python #scip
The most important kind of compound expression is a call expression, which applies a function to some arguments.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
ways to form compound expressions. Rather than attempt to enumerate them all immediately, we will introduce new expression forms as we go, along with the language features that they support. 1.2.2 Call Expressions Video: Show Hide <span>The most important kind of compound expression is a call expression, which applies a function to some arguments. Recall from algebra that the mathematical notion of a function is a mapping from some input arguments to an output value. For instance, the max function maps its inputs to a single ou




#python #scip
the operator is an expression that precedes parentheses, which enclose a comma-delimited list of operand expressions.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
s inputs to a single output, which is the largest of the inputs. The way in which Python expresses function application is the same as in conventional mathematics. >>> max(7.5, 9.5) 9.5 This call expression has subexpressions: <span>the operator is an expression that precedes parentheses, which enclose a comma-delimited list of operand expressions. The operator specifies a function. When this call expression is evaluated, we say that the function max is called with arguments 7.5 and 9.5, and returns a value of 9.5. The




#python #scip

The operator specifies a function. When this call expression is evaluated, we say that the function max is called with arguments 7.5 and 9.5, and returns a value of 9.5.

The order of the arguments in a call expression matters. For instance, the function pow raises its first argument to the power of its second argument.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
he same as in conventional mathematics. >>> max(7.5, 9.5) 9.5 This call expression has subexpressions: the operator is an expression that precedes parentheses, which enclose a comma-delimited list of operand expressions. <span>The operator specifies a function. When this call expression is evaluated, we say that the function max is called with arguments 7.5 and 9.5, and returns a value of 9.5. The order of the arguments in a call expression matters. For instance, the function pow raises its first argument to the power of its second argument. >>> pow(100, 2) 10000 >>> pow(2, 100) 1267650600228229401496703205376 Function notation has three principal advantages over the mathematical convention of infix




#python #scip

Function notation has three principal advantages over the mathematical convention of infix notation. First, functions may take an arbitrary number of arguments:

 >>> max ( 1 , - 2 , 3 , - 4 ) 3 

No ambiguity can arise, because the function name always precedes its arguments.

Second, function notation extends in a straightforward way to nested expressions, where the elements are themselves compound expressions. In nested call expressions, unlike compound infix expressions, the structure of the nesting is entirely explicit in the parentheses.

 >>> max ( min ( 1 , - 2 ), min ( pow ( 3 , 5 ), - 4 )) -2 

There is no limit (in principle) to the depth of such nesting and to the overall complexity of the expressions that the Python interpreter can evaluate. However, humans quickly get confused by multi-level nesting. An important role for you as a programmer is to structure expressions so that they remain interpretable by yourself, your programming partners, and other people who may read your expressions in the future.

Third, mathematical notation has a great variety of forms: multiplication appears between terms, exponents appear as superscripts, division as a horizontal bar, and a square root as a roof with slanted siding. Some of this notation is very hard to type! However, all of this complexity can be unified via the notation of call expressions. While Python supports common mathematical operators using infix notation (like + and - ), any operator can be expressed as a function with a name.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
order of the arguments in a call expression matters. For instance, the function pow raises its first argument to the power of its second argument. >>> pow(100, 2) 10000 >>> pow(2, 100) 1267650600228229401496703205376 <span>Function notation has three principal advantages over the mathematical convention of infix notation. First, functions may take an arbitrary number of arguments: >>> max(1, -2, 3, -4) 3 No ambiguity can arise, because the function name always precedes its arguments. Second, function notation extends in a straightforward way to nested expressions, where the elements are themselves compound expressions. In nested call expressions, unlike compound infix expressions, the structure of the nesting is entirely explicit in the parentheses. >>> max(min(1, -2), min(pow(3, 5), -4)) -2 There is no limit (in principle) to the depth of such nesting and to the overall complexity of the expressions that the Python interpreter can evaluate. However, humans quickly get confused by multi-level nesting. An important role for you as a programmer is to structure expressions so that they remain interpretable by yourself, your programming partners, and other people who may read your expressions in the future. Third, mathematical notation has a great variety of forms: multiplication appears between terms, exponents appear as superscripts, division as a horizontal bar, and a square root as a roof with slanted siding. Some of this notation is very hard to type! However, all of this complexity can be unified via the notation of call expressions. While Python supports common mathematical operators using infix notation (like + and - ), any operator can be expressed as a function with a name. 1.2.3 Importing Library Functions Python defines a very large number of functions, including the operator functions mentioned in the preceding section, but does not make all o




#python #scip
If a value has been given a name, we say that the name binds to the value
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
y, this documentation will become a valuable reference source. 1.2.4 Names and the Environment Video: Show Hide A critical aspect of a programming language is the means it provides for using names to refer to computational objects. <span>If a value has been given a name, we say that the name binds to the value. In Python, we can establish new bindings using the assignment statement, which contains a name to the left of = and a value to the right: >>> radius = 10 >>> ra




#python #scip
we can establish new bindings using the assignment statement, which contains a name to the left of = and a value to the right:
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
he Environment Video: Show Hide A critical aspect of a programming language is the means it provides for using names to refer to computational objects. If a value has been given a name, we say that the name binds to the value. In Python, <span>we can establish new bindings using the assignment statement, which contains a name to the left of = and a value to the right: >>> radius = 10 >>> radius 10 >>> 2 * radius 20 Names are also bound via import statements. >>> from math import pi >>> pi * 71 /




#python #scip
he = symbol is called the assignment operator in Python (and many other languages)
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
= and a value to the right: >>> radius = 10 >>> radius 10 >>> 2 * radius 20 Names are also bound via import statements. >>> from math import pi >>> pi * 71 / 223 1.0002380197528042 T<span>he = symbol is called the assignment operator in Python (and many other languages). Assignment is our simplest means of abstraction, for it allows us to use simple names to refer to the results of compound operations, such as the area computed above. In this way, co




#python #scip
Assignment is our simplest means of abstraction, for it allows us to use simple names to refer to the results of compound operations
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
t;> 2 * radius 20 Names are also bound via import statements. >>> from math import pi >>> pi * 71 / 223 1.0002380197528042 The = symbol is called the assignment operator in Python (and many other languages). <span>Assignment is our simplest means of abstraction, for it allows us to use simple names to refer to the results of compound operations, such as the area computed above. In this way, complex programs are constructed by building, step by step, computational objects of increasing complexity. The possibility of binding




#python #scip
memory that keeps track of the names, values, and bindings. This memory is called an environment.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
x programs are constructed by building, step by step, computational objects of increasing complexity. The possibility of binding names to values and later retrieving those values by name means that the interpreter must maintain some sort of <span>memory that keeps track of the names, values, and bindings. This memory is called an environment. Names can also be bound to functions. For instance, the name max is bound to the max function we have been using. Functions, unlike numbers, are tricky to render as text, so Python




#python #scip

To evaluate a call expression, Python will do the following:

  1. Evaluate the operator and operand subexpressions, then
  2. Apply the function that is the value of the operator subexpression to the arguments that are the values of the operand subexpressions.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
uating Nested Expressions One of our goals in this chapter is to isolate issues about thinking procedurally. As a case in point, let us consider that, in evaluating nested call expressions, the interpreter is itself following a procedure. <span>To evaluate a call expression, Python will do the following: Evaluate the operator and operand subexpressions, then Apply the function that is the value of the operator subexpression to the arguments that are the values of the operand subexpressions. Even this simple procedure illustrates some important points about processes in general. The first step dictates that in order to accomplish the evaluation process for a call expressi




#python #scip

Next, observe that the repeated application of the first step brings us to the point where we need to evaluate, not call expressions, but primitive expressions such as numerals (e.g., 2) and names (e.g., add ). We take care of the primitive cases by stipulating that

  • A numeral evaluates to the number it names,
  • A name evaluates to the value associated with that name in the current environment.

Notice the important role of an environment in determining the meaning of the symbols in expressions

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
rule is applied, and the result of that expression. Viewing evaluation in terms of this tree, we can imagine that the values of the operands percolate upward, starting from the terminal nodes and then combining at higher and higher levels. <span>Next, observe that the repeated application of the first step brings us to the point where we need to evaluate, not call expressions, but primitive expressions such as numerals (e.g., 2) and names (e.g., add ). We take care of the primitive cases by stipulating that A numeral evaluates to the number it names, A name evaluates to the value associated with that name in the current environment. Notice the important role of an environment in determining the meaning of the symbols in expressions. In Python, it is meaningless to speak of the value of an expression such as >>> add(x, 1) without specifying any information about the environment that would provide a m




#python #scip
A pedantic note: when we say that "a numeral evaluates to a number," we actually mean that the Python interpreter evaluates a numeral to a number. It is the interpreter which endows meaning to the programming language.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
ment is instead to bind a name to a value. In general, statements are not evaluated but executed; they do not produce a value but instead make some change. Each type of expression or statement has its own evaluation or execution procedure. <span>A pedantic note: when we say that "a numeral evaluates to a number," we actually mean that the Python interpreter evaluates a numeral to a number. It is the interpreter which endows meaning to the programming language. Given that the interpreter is a fixed program that always behaves consistently, we can say that numerals (and expressions) themselves evaluate to values in the context of Python progra




#python #scip
Pure functions. Functions have some input (their arguments) and return some output (the result of applying them).
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
can say that numerals (and expressions) themselves evaluate to values in the context of Python programs. 1.2.6 The Non-Pure Print Function Video: Show Hide Throughout this text, we will distinguish between two types of functions. <span>Pure functions. Functions have some input (their arguments) and return some output (the result of applying them). The built-in function >>> abs(-2) 2 can be depicted as a small machine that takes input and produces output. The function abs is pure. Pure functions have the p




#python #scip
Pure functions have the property that applying them has no effects beyond returning a value. Moreover, a pure function must always return the same value when called twice with the same arguments.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
some input (their arguments) and return some output (the result of applying them). The built-in function >>> abs(-2) 2 can be depicted as a small machine that takes input and produces output. The function abs is pure. <span>Pure functions have the property that applying them has no effects beyond returning a value. Moreover, a pure function must always return the same value when called twice with the same arguments. Non-pure functions. In addition to returning a value, applying a non-pure function can generate side effects, which make some change to the state of the interpreter or computer. A co




#python #scip
Non-pure functions. In addition to returning a value, applying a non-pure function can generate side effects, which make some change to the state of the interpreter or computer. A common side effect is to generate additional output beyond the return value, using the print function.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
s output. The function abs is pure. Pure functions have the property that applying them has no effects beyond returning a value. Moreover, a pure function must always return the same value when called twice with the same arguments. <span>Non-pure functions. In addition to returning a value, applying a non-pure function can generate side effects, which make some change to the state of the interpreter or computer. A common side effect is to generate additional output beyond the return value, using the print function. >>> print(1, 2, 3) 1 2 3 While print and abs may appear to be similar in these examples, they work in fundamentally different ways. The value that print returns is




#python #scip
Pure functions are restricted in that they cannot have side effects or change behavior over time.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
this expression produces this peculiar output. Be careful with print ! The fact that it returns None means that it should not be the expression in an assignment statement. >>> two = print(2) 2 >>> print(two) None <span>Pure functions are restricted in that they cannot have side effects or change behavior over time. Imposing these restrictions yields substantial benefits. First, pure functions can be composed more reliably into compound call expressions. We can see in the non-pure function example




Flashcard 1436371258636

Tags
#python #scip
Question
First, pure functions can be composed more reliably into compound call expressions.
Answer
[default - edit me]

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
1.2 Elements of Programming
assignment statement. >>> two = print(2) 2 >>> print(two) None Pure functions are restricted in that they cannot have side effects or change behavior over time. Imposing these restrictions yields substantial benefits. <span>First, pure functions can be composed more reliably into compound call expressions. We can see in the non-pure function example above that print does not return a useful result when used in an operand expression. On the other hand, we have seen that functions such







#python #scip
Second, pure functions tend to be simpler to test.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
non-pure function example above that print does not return a useful result when used in an operand expression. On the other hand, we have seen that functions such as max , pow and sqrt can be used effectively in nested expressions. <span>Second, pure functions tend to be simpler to test. A list of arguments will always lead to the same return value, which can be compared to the expected return value. Testing is discussed in more detail later in this chapter. Third, Ch




#python #scip
Third, Chapter 4 will illustrate that pure functions are essential for writing concurrent programs, in which multiple call expressions may be evaluated simultaneously.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.2 Elements of Programming
expressions. Second, pure functions tend to be simpler to test. A list of arguments will always lead to the same return value, which can be compared to the expected return value. Testing is discussed in more detail later in this chapter. <span>Third, Chapter 4 will illustrate that pure functions are essential for writing concurrent programs, in which multiple call expressions may be evaluated simultaneously. By contrast, Chapter 2 investigates a range of non-pure functions and describes their uses. For these reasons, we concentrate heavily on creating and using pure functions in the rem




We have identified in Python some of the elements that must appear in any powerful programming language:

  1. Numbers and arithmetic operations are primitive built-in data values and functions.
  2. Nested function application provides a means of combining operations.
  3. Binding names to values provides a limited means of abstraction.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.3 Defining New Functions
1.7.1 The Anatomy of Recursive Functions 1.7.2 Mutual Recursion 1.7.3 Printing in Recursive Functions 1.7.4 Tree Recursion 1.7.5 Example: Partitions 1.3 Defining New Functions Video: Show Hide <span>We have identified in Python some of the elements that must appear in any powerful programming language: Numbers and arithmetic operations are primitive built-in data values and functions. Nested function application provides a means of combining operations. Binding names to values provides a limited means of abstraction. Now we will learn about function definitions, a much more powerful abstraction technique by which a name can be bound to compound operation, which can then be referred to as a unit.




How to define a function. Function definitions consist of a def statement that indicates a <name> and a comma-separated list of named <formal parameters> , then a return statement, called the function body, that specifies the <return expression> of the function, which is an expression to be evaluated whenever the function is applied:
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on




An environment in which an expression is evaluated consists of a sequence of frames, depicted as boxes. Each frame contains bindings, each of which associates a name with its corresponding value. There is a single global frame. Assignment and import statements add entries to the first frame of the current environment.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.3 Defining New Functions
gh that the meaning of programs is non-obvious. What if a formal parameter has the same name as a built-in function? Can two functions share names without confusion? To resolve such questions, we must describe environments in more detail. <span>An environment in which an expression is evaluated consists of a sequence of frames, depicted as boxes. Each frame contains bindings, each of which associates a name with its corresponding value. There is a single global frame. Assignment and import statements add entries to the first frame of the current environment. So far, our environment consists only of the global frame. 1 from math import pi 2 tau = 2 * pi Edit code in Online Python Tutor




#python #sicp
The name of a function is repeated twice, once in the frame and again as part of the function itself. The name appearing in the function is called the intrinsic name. The name in a frame is a bound name. There is a difference between the two: different names may refer to the same function, but that function itself has only one intrinsic name.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.3 Defining New Functions
nc square(x) Each function is a line that starts with func , followed by the function name and formal parameters. Built-in functions such as mul do not have formal parameter names, and so ... is always used instead. <span>The name of a function is repeated twice, once in the frame and again as part of the function itself. The name appearing in the function is called the intrinsic name. The name in a frame is a bound name. There is a difference between the two: different names may refer to the same function, but that function itself has only one intrinsic name. The name bound to a function in a frame is the one used during evaluation. The intrinsic name of a function does not play a role in evaluation. Step through the example below using th




#python #sicp
This principle -- that the meaning of a function should be independent of the parameter names chosen by its author -- has important consequences for programming languages. The simplest consequence is that the parameter names of a function must remain local to the body of the function.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.3 Defining New Functions
mplementer's choice of names for the function's formal parameters. Thus, the following functions should provide the same behavior: >>> def square(x): return mul(x, x) >>> def square(y): return mul(y, y) <span>This principle -- that the meaning of a function should be independent of the parameter names chosen by its author -- has important consequences for programming languages. The simplest consequence is that the parameter names of a function must remain local to the body of the function. If the parameters were not local to the bodies of their respective functions, then the parameter x in square could be confused with the parameter x in sum_squares . Critically,




#python #sicp
the scope of a local name is limited to the body of the user-defined function that defines it. When a name is no longer accessible, it is out of scope.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

1.3 Defining New Functions
ould be confused with the parameter x in sum_squares . Critically, this is not the case: the binding for x in different local frames are unrelated. The model of computation is carefully designed to ensure this independence. We say that <span>the scope of a local name is limited to the body of the user-defined function that defines it. When a name is no longer accessible, it is out of scope. This scoping behavior isn't a new fact about our model; it is a consequence of the way environments work. 1.3.5 Choosing Names The interchangeability of names does not imply t