#python #sicp
When executing a conditional statement, each clause is considered in order. The
computational process of executing a conditional clause follows.
- Evaluate the header's expression.
- If it is a true value, execute the suite. Then, skip over all subsequent
clauses in the conditional statement.
If you want to change selection, open document below and click on "Move attachment"
1.5 Controlonditional statements . A conditional statement in Python consists of a
series of headers and suites: a required if clause, an optional sequence of
elif clauses, and finally an optional else clause:
if :
elif :
else:
<span>When executing a conditional statement, each clause is considered in order. The
computational process of executing a conditional clause follows.
Evaluate the header's expression. If it is a true value, execute the suite. Then, skip over all subsequent
clauses in the conditional statement.
If the else clause is reached (which only happens if all if and elif
expressions evaluate to false values), its suite is executed.
Boolean contexts . Above, the execution proc Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details