Anonymous user
Boston Python Workshop 8/Friday/Tutorial: Difference between revisions
Boston Python Workshop 8/Friday/Tutorial (view source)
Revision as of 14:22, 12 July 2013
, 10 years ago→Making choices
imported>Jesstess |
imported>Jesstess |
||
Line 504:
==Making choices==
We can use these expressions that <i>evaluate</i> to booleans to make decisions and conditionally execute code
[[File:Fork.png|100px]]
Line 509 ⟶ 511:
====if statements====
The simplest way to make a choice in Python is with the <code>if</code> keyword. Here's an example:
▲We can use these expressions that <i>evaluate</i> to booleans to make decisions and conditionally execute code:
<pre>
|