Archive:Think Python/Variables, expressions and statements: Difference between revisions
wikademia>Whiteknight m Partial (mostly) conversion from HTML to Wikitext |
wikademia>Wikademia m moved Think Python/Variables, expressions and statements to Archive:Think Python/Variables, expressions and statements |
||
| (4 intermediate revisions by 2 users not shown) | |||
| Line 8: | Line 8: | ||
{{?}} | |||
A '''value''' is one of the basic things a program works with, | A '''value''' is one of the basic things a program works with, | ||
| Line 253: | Line 253: | ||
<PRE CLASS="verbatim">>>> minute/60.0 | <PRE CLASS="verbatim">>>> minute/60.0 | ||
0.98333333333333328 | 0.98333333333333328 | ||
</PRE>=== 2.6  Expressions === | </PRE> | ||
=== 2.6  Expressions === | |||
An '''expression''' is a combination of values, variables, and operators. | An '''expression''' is a combination of values, variables, and operators. | ||
| Line 284: | Line 285: | ||
expression into a print statement and then run it again. | expression into a print statement and then run it again. | ||
'''' | '''' | ||
</DIV>=== 2.7  Order of operations === | </DIV> | ||
=== 2.7  Order of operations === | |||
| Line 472: | Line 474: | ||
programmers (or anyone reading the source code) and has no effect on the | programmers (or anyone reading the source code) and has no effect on the | ||
execution of the program. | execution of the program. | ||
</DD></DL>=== 2.12  Exercises === | </DD></DL> | ||
=== 2.12  Exercises === | |||
<DIV CLASS="theorem">'''Exercise 3'''  '' | <DIV CLASS="theorem">'''Exercise 3'''  '' | ||
| Line 515: | Line 518: | ||
<TT>//</TT> performs integer division. | <TT>//</TT> performs integer division. | ||
</DD></DL> | </DD></DL> | ||